elasticsearch
throughput_error
ai_generated
true
EsRejectedExecutionException: rejected execution of coordinating operation [coordinating_and_primary_bytes=0, replica_bytes=0, all_bytes=0, coordinating_operation_bytes=xxxx, max_coordinating_and_primary_bytes=xxx]
ID: elasticsearch/rejected-execution-exception
82%Fix Rate
87%Confidence
3Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 8 | active | — | — | — |
Root Cause
Thread pool queue is full, rejecting new operations. Indexing or search rate exceeds cluster capacity.
genericWorkarounds
-
92% success Implement client-side backoff and retry on 429/rejected responses
Catch 429 TOO_MANY_REQUESTS and retry with exponential backoff; bulk API returns per-item status
Sources: https://www.elastic.co/guide/en/elasticsearch/reference/current/
-
88% success Reduce bulk request size and concurrent bulk threads
Start with 5-15 MB bulk size and 1-2 bulk threads per node; increase gradually while monitoring rejections
-
82% success Scale out by adding data nodes to distribute load
More shards across more nodes increases write throughput linearly
Dead Ends
Common approaches that don't work:
-
Increase thread pool queue size to a very large value
80% fail
Large queues just delay rejection while consuming more heap memory. The real issue is ingestion rate exceeding throughput.
-
Set refresh_interval=-1 to speed up indexing
65% fail
Disabling refresh makes recently indexed docs invisible to search and does not address queue capacity