{
  "id": "elasticsearch/too-many-requests-bulk-queue",
  "signature": "EsRejectedExecutionException: rejected execution of coordinating operation [coordinating_and_primary_bytes=0, replica_bytes=0, all_bytes=0, source=bulk]",
  "signature_zh": "ES 拒绝执行异常：拒绝执行协调操作 [coordinating_and_primary_bytes=0, replica_bytes=0, all_bytes=0, source=bulk]",
  "regex": "EsRejectedExecutionException: rejected execution of coordinating operation \\[coordinating_and_primary_bytes=\\d+, replica_bytes=\\d+, all_bytes=\\d+, source=bulk\\]",
  "domain": "elasticsearch",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "The bulk queue on the coordinating node is full due to high indexing throughput, causing new bulk requests to be rejected.",
  "root_cause_type": "generic",
  "root_cause_zh": "由于高索引吞吐量，协调节点上的批量队列已满，导致新的批量请求被拒绝。",
  "versions": [
    {
      "version": "elasticsearch 7.17",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "elasticsearch 8.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "elasticsearch 8.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Large queue sizes can lead to high memory usage and increased latency, potentially causing OOM or degraded performance.",
      "fail_rate": 0.55,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Without retries, bulk requests are lost permanently, leading to data loss and incomplete indexing.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Fewer nodes can increase per-node load and worsen the queue pressure, making the error more frequent.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Implement exponential backoff retry in the client: for example, in Python using elasticsearch-py: from elasticsearch import Elasticsearch; from time import sleep; es = Elasticsearch(); for attempt in range(5): try: es.bulk(body=docs); break except Exception as e: sleep(2 ** attempt)",
      "success_rate": 0.85,
      "how": "Implement exponential backoff retry in the client: for example, in Python using elasticsearch-py: from elasticsearch import Elasticsearch; from time import sleep; es = Elasticsearch(); for attempt in range(5): try: es.bulk(body=docs); break except Exception as e: sleep(2 ** attempt)",
      "condition": "",
      "sources": []
    },
    {
      "action": "Increase the bulk queue size temporarily: PUT _cluster/settings { \"transient\": { \"thread_pool.bulk.queue_size\": 2000 } }",
      "success_rate": 0.75,
      "how": "Increase the bulk queue size temporarily: PUT _cluster/settings { \"transient\": { \"thread_pool.bulk.queue_size\": 2000 } }",
      "condition": "",
      "sources": []
    },
    {
      "action": "Scale up the coordinating nodes by adding more nodes or increasing their heap size to handle higher throughput.",
      "success_rate": 0.8,
      "how": "Scale up the coordinating nodes by adding more nodes or increasing their heap size to handle higher throughput.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在客户端实现指数退避重试：例如，使用 elasticsearch-py：from elasticsearch import Elasticsearch; from time import sleep; es = Elasticsearch(); for attempt in range(5): try: es.bulk(body=docs); break except Exception as e: sleep(2 ** attempt)",
    "临时增加批量队列大小：PUT _cluster/settings { \"transient\": { \"thread_pool.bulk.queue_size\": 2000 } }",
    "通过添加更多节点或增加堆大小来扩展协调节点，以处理更高的吞吐量。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/rejected-execution.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-11-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}