kafka
runtime_error
ai_generated
true
org.apache.kafka.common.errors.GroupJoinTimeoutException: Join group request timed out
ID: kafka/group-join-timeout
80%Fix Rate
85%Confidence
1Evidence
2024-03-15First Seen
Root Cause
Consumer failed to join the consumer group within the configured session timeout or max.poll.interval.ms.
generic中文
消费者未能在配置的会话超时或max.poll.interval.ms内加入消费者组。
Official Documentation
https://kafka.apache.org/documentation/#consumerconfigs_session.timeout.msWorkarounds
-
80% success Increase max.poll.interval.ms to allow more time between polls, e.g., props.put("max.poll.interval.ms", "600000");
Increase max.poll.interval.ms to allow more time between polls, e.g., props.put("max.poll.interval.ms", "600000"); -
75% success Reduce max.poll.records to process fewer records per poll, e.g., props.put("max.poll.records", "100");
Reduce max.poll.records to process fewer records per poll, e.g., props.put("max.poll.records", "100"); -
85% success Use a separate thread for processing and call consumer.commitAsync() more frequently.
Use a separate thread for processing and call consumer.commitAsync() more frequently.
中文步骤
增加 max.poll.interval.ms 以允许轮询之间有更多时间,例如 props.put("max.poll.interval.ms", "600000");减少 max.poll.records 以每次轮询处理更少的记录,例如 props.put("max.poll.records", "100");使用单独的线程进行处理并更频繁地调用 consumer.commitAsync()。
Dead Ends
Common approaches that don't work:
-
85% fail
Increasing session.timeout.ms alone doesn't fix slow processing; it only delays the timeout.
-
90% fail
Restarting the consumer doesn't resolve the underlying cause of slow processing or network issues.