ElasticSearch Error: TOO_MANY_REQUESTS

elasticsearch too-many

Sometime can happens following bug with Elastic Search

{"error":{"root_cause":[{"type":"cluster_block_exception","reason":"index [magento_product_1_v2] 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 [magento_product_1_v2] blocked by: [TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block];"},"status":429}

For resolve this issue – try update settings of Elastic Search:

curl -XPUT -H "Content-Type: application/json" http://0.0.0.0:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'

Where 0.0.0.0:9200 is address of ElasticSearch instance. In my case – run command from host-computer to Docker (where installed/running ElasticSearch)