Kafka Exception TimeoutException
org.apache.kafka.common.errors.TimeoutException
Retriable
Broker
Indicates that a request timed out.
Reviewed 2026-10-27 · 4.4.0 · source-reviewed. Source · Source
Common Causes
- The requested operation did not complete within the relevant server/client time budget; overload, replication delays and network problems can contribute.
Solutions
- A timeout does not prove that a write was rejected. Inspect delivery callbacks/futures and transaction state before retrying at application level.
- Measure request queues, disk/CPU saturation, replication and network latency. Increase relevant time budgets only if they match the workload’s failure budget; there is no universal idle-percentage threshold for increasing thread counts.
Example Stack Trace
org.apache.kafka.common.errors.TimeoutException: The request timed out.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
Protocol error: REQUEST_TIMED_OUT (code 7)
Related Broker exceptions: CorruptRecordException · FencedLeaderEpochException · LeaderNotAvailableException · NetworkException · NotEnoughReplicasAfterAppendException · NotEnoughReplicasException · NotLeaderOrFollowerException · UnknownLeaderEpochException
Hitting
TimeoutException in production? Conduktor Console gives you real-time visibility into clients, consumer groups, and broker health. Browse every Kafka exception or protocol error code.