I have installed an elastic search(7.x) with Magento2.4 and I am using PHP 7.3 When I run the reindex command(bin/magento indexer:reindex
) getting the following error.
Catalog Search index process unknown error: {"error":{"root_cause":[{"type":"cluster_block_exception","reason":"index [magento2_product_1_v1] blocked by: [TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block];"}],"type":"cluster_block_exception","reason":"index [magento2_product_1_v1] blocked by: [TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block];"},"status":429}
If anyone resolved this issue? Please let me know.
Thanks.
As of Adobe Commerce and Magento Open Source 2.4, all installations must be configured to use Elasticsearch or OpenSearch as the catalog search solution.
Reindexing via Magento 2 Admin Log in to Magento 2 Admin and navigate to System → Index Management. You will see the panel above. Select indexers, which has status Reindex Required, then select in Actions menu Update on Schedule. Press Submit button to apply selected mode to indexers.
Elasticsearch index prefix Magento 2 option means that you need to enter an Elasticsearch index prefix. If you use one Elasticsearch instance for more than one Magento installation, specify a unique prefix for each installation. If not, use the default magento2 prefix.
When the data changes, the transformed data must be updated or reindexed. With the support of reindexing, Magento 2 store owners can quickly and correctly change the store data, reduce the waiting time of customers, and increase the conversion rate.
Just execute the following commands in the command line:
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_cluster/settings -d '{ "transient": { "cluster.routing.allocation.disk.threshold_enabled": false } }'
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'
This configures your ES installation to work properly with Magento 2.
Taken from: https://www.magemonkeys.com/how-to-solve-cluster_block_exception-too_many_requests-12-disk-usage-exceeded-flood-stage-watermark-index-has-read-only-allow-delete-block-in-magento-2/
Background of the issue
As ES heavily depends on the Disk space to function properly(ES stores index on file system), there are several disk watermark threshold to protect the ES cluster and you reached the highest threshold called flood
which can cause important functionality in cluster to break (allocating new shards, index to name a few).
How to fix the issue
There are multiple ways to fix the issue temporary or permanent with different trade-offs, I've written a detailed post explaining the issue and various fixes Please have a look and choose what suited best for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With