elasticsearch resource_error ai_generated true

ElasticsearchException:索引[0]恢复因max_bytes_per_sec [40mb]被限流

ElasticsearchException: [index][0] recovery throttled due to max_bytes_per_sec [40mb]

ID: elasticsearch/max-bytes-per-sec-throttle

其他格式: JSON · Markdown 中文 · English
78%修复率
85%置信度
1证据数
2024-06-15首次发现

版本兼容性

版本状态引入弃用备注
elasticsearch 7.17.0 active
elasticsearch 8.10.0 active
elasticsearch 8.6.2 active

根因分析

分片恢复被限流,因为节点的max_bytes_per_sec设置对于当前恢复负载过低。

English

Shard recovery is throttled because the node's max_bytes_per_sec setting is too low for the current recovery load.

generic

官方文档

https://www.elastic.co/guide/en/elasticsearch/reference/current/recovery.html

解决方案

  1. 临时增加max_bytes_per_sec:PUT _cluster/settings { "transient": { "indices.recovery.max_bytes_per_sec": "100mb" } }
  2. 减少并发恢复数:在elasticsearch.yml中设置indices.recovery.concurrent_streams为2以限制恢复并行度。
  3. 分配更多专用热节点以分散恢复负载,然后重新平衡副本。

无效尝试

常见但无效的做法:

  1. 45% 失败

    This can saturate network bandwidth and cause other node failures, especially in clusters with many concurrent recoveries.

  2. 70% 失败

    Restarting only resets the recovery process temporarily; throttling reapplies once recovery resumes.

  3. 65% 失败

    Setting to 0 disables throttling but can overwhelm the node's I/O, leading to OOM or disk saturation.