Interview Prep/Monitoring & Observability/Logging: Loki, Fluent Bit and Elasticsearch

Bulk indexing fails with `es_rejected_execution_exception ... rejected execution ... queue capacity`

AdvancedTroubleshootingLogging: Loki, Fluent Bit and Elasticsearch
Answer

Likely causes → The write thread pool queue is full; the cluster can't keep up (hot shards, too many small shards, slow disks).

Diagnose →

curl -s 'es:9200/_cat/thread_pool/write?v&h=node_name,active,queue,rejected'
curl -s 'es:9200/_cat/shards?v&s=store:desc' | head

Fix → Let clients back off and retry, reduce shard count, increase refresh_interval to 30s on log indices, scale hot nodes.

Prevent → Size shards to 10–50 GB and watch the rejected counter.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Logging: Loki, Fluent Bit and Elasticsearch