Kafka Error REQUEST_TIMED_OUT
Error code 7 · Retriable Broker
The request timed out.
Common Causes
- Broker overloaded (high CPU, GC pauses, or disk I/O saturation) causing request queue buildup beyond 'request.timeout.ms'
- Network latency or packet loss between client and broker exceeding the client's 'request.timeout.ms' threshold
- Producer with 'acks=all' waiting for ISR acknowledgment but slow replicas or a shrunk ISR delay the response
Solutions
- Increase 'request.timeout.ms' (default 30000ms) and 'delivery.timeout.ms' on producers to give brokers more time under load; for consumers, increase 'request.timeout.ms' and 'default.api.timeout.ms'
- Check broker request handler thread pool: if 'RequestHandlerAvgIdlePercent' JMX metric < 0.3, increase 'num.io.threads' and 'num.network.threads' in broker config
- For ISR-related timeouts: monitor 'IsrShrinksPerSec' and investigate slow replica brokers; check disk throughput with 'iostat -x 1' on broker hosts
Diagnostic Commands
# Check for under-replicated partitions
kafka-topics.sh --describe --bootstrap-server localhost:9092 --under-replicated-partitions
# Check request handler utilization in logs
grep -E 'RequestHandlerAvgIdlePercent|NetworkProcessorAvgIdlePercent' /var/log/kafka/server.log | tail -20Related APIs
This error can be returned by: EndTxn · InitProducerId · WriteTxnMarkers
Debugging Kafka errors? Conduktor Console gives you real-time visibility into your cluster. Explore all errors in the Error Decoder.