LoginSignup
0
0

More than 1 year has passed since last update.

docker Elasticserchで[429 Too Many Requests]が出た時の対応

Posted at

事例

  • 環境
    • image:: elasticsearch:7.12.1
    • os:: mac

エラー例

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

原因

"blocks": {
        "read_only_allow_delete": "false",
}

こちらの設定が入っているとディスク容量がデフォルト95% を超えるとインデックスが読み取り専用となるため書き込みができなくなっていた

対処

docker が使っているサイズチェック

> docker system df
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          35        5         11.54GB   9.134GB (79%)
Containers      5         0         6.635MB   6.635MB (100%)
Local Volumes   140       3         32.3GB    26.93GB (83%)
Build Cache     89        0         1.048GB   1.048GB

削除コマンド

使用していないvolumeの削除

> docker volume ls -qf dangling=true | xargs -r docker volume rm

結果

> docker system df
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          35        5         11.54GB   9.134GB (79%)
Containers      5         0         6.635MB   6.635MB (100%)
Local Volumes   3         3         5.374GB   0B (0%)
Build Cache     89        0         1.048GB   1.048GB

Local Volumeを削除したらデータを投入することができました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0