Kafka Error INVALID_SESSION_TIMEOUT
Error code 26 · Non-retriable Consumer
The session timeout is not within the range allowed by the broker (as configured by group.min.session.timeout.ms and group.max.session.timeout.ms).
Common Causes
- 'session.timeout.ms' on the consumer is outside the broker's allowed range defined by group.min.session.timeout.ms and group.max.session.timeout.ms
- A framework, sidecar, or config template is overriding session.timeout.ms to a value that works in one cluster but not in another with stricter broker limits
- An older deployment template hardcoded a session timeout that no longer matches the cluster-wide broker settings after an upgrade or policy change
Solutions
- Read the broker-side limits first: kafka-configs.sh --bootstrap-server localhost:9092 --entity-type brokers --entity-default --describe | grep -E 'group.min.session.timeout.ms|group.max.session.timeout.ms'; then set the consumer's session.timeout.ms within that range
- If the consumer legitimately needs a longer failure-detection window, raise group.max.session.timeout.ms on the brokers; if you need faster failure detection, lower session.timeout.ms but keep it above group.min.session.timeout.ms
- Fix the deployment template or framework override that is setting session.timeout.ms incorrectly so all consumers in the group use a value the cluster accepts
Diagnostic Commands
# Check broker session timeout limits
kafka-configs.sh --bootstrap-server localhost:9092 --entity-type brokers --entity-default --describe | grep -E 'group.min.session.timeout.ms|group.max.session.timeout.ms'
# Describe consumer group offsets and lag
kafka-consumer-groups.sh --bootstrap-server localhost:9092 --group <group> --describeRelated APIs
This error can be returned by: JoinGroup
Debugging Kafka errors? Conduktor Console gives you real-time visibility into your cluster. Explore all errors in the Error Decoder.