DEV Community

Yasien Dwieb
Yasien Dwieb

Posted on • Edited on

[TIL] Fix: TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block

This will be a series of issues that I faced and found a solution for, which could help someone or my future self

I have been facing this issue when I was trying to index data on ElasticSearch 7.* on Docker

Env:
Laravel + laravel scout + El

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

Solution that worked for me:
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}'

Reference:
https://discuss.elastic.co/t/elasticsearch-docker-flood-stage-disk-watermark-95-exceeded/248479

Top comments (0)