Magento 2.4 reindex issue with elasticsearch
Asked Answered
M

2

7

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.

Mcgrath answered 1/9, 2020 at 14:42 Comment(2)
You don't have free space in your elasticsearch data disk, this is what this message means disk usage exceeded flood-stage watermark, index has read-only-allow-delete block. The flood-stage watermark happens when you have used 95% of the disk space for the data directory of your node. You need to free the space or increase it.Branchia
@Branchia Can you please tell me how to do that via terminal. I am using linux.Mcgrath
I
11

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/

Incommodity answered 16/9, 2021 at 4:41 Comment(1)
note: this need to be done from the root of your server, it helped meFraktur
A
3

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.

Achaean answered 2/9, 2020 at 9:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.