Skip to content

Commit 6cb11b2

Browse files
author
Ivan Franchin
committed
Fix flood stage disk watermark issue in Elasticsearch
1 parent 13e5e5e commit 6cb11b2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

create-index.sh

+7-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
echo "-----------------------"
44
echo "Fix High Disk Watermark"
55
echo "-----------------------"
6-
# Reference: https://www.elastic.co/guide/en/elasticsearch/reference/current/fix-watermark-errors.html
6+
# Reference: https://stackoverflow.com/questions/63880017/elasticsearch-docker-flood-stage-disk-watermark-95-exceeded
77

8-
curl -X PUT localhost:9200/_cluster/settings \
8+
curl -X PUT http://localhost:9200/_cluster/settings \
99
-H "Content-Type: application/json" \
10-
-d '{ "persistent": { "cluster.routing.allocation.disk.watermark.low": "90%", "cluster.routing.allocation.disk.watermark.low.max_headroom": "100GB", "cluster.routing.allocation.disk.watermark.high": "95%", "cluster.routing.allocation.disk.watermark.high.max_headroom": "20GB", "cluster.routing.allocation.disk.watermark.flood_stage": "97%", "cluster.routing.allocation.disk.watermark.flood_stage.max_headroom": "5GB", "cluster.routing.allocation.disk.watermark.flood_stage.frozen": "97%", "cluster.routing.allocation.disk.watermark.flood_stage.frozen.max_headroom": "5GB" } }'
10+
-d '{ "transient": { "cluster.routing.allocation.disk.threshold_enabled": false } }'
11+
12+
curl -X PUT http://localhost:9200/_all/_settings \
13+
-H "Content-Type: application/json" \
14+
-d '{ "index.blocks.read_only_allow_delete": null }'
1115

1216
echo
1317
echo "-----------------"

0 commit comments

Comments
 (0)