kafka
runtime_error
ai_generated
true
组加入超时异常:加入组请求超时
org.apache.kafka.common.errors.GroupJoinTimeoutException: Join group request timed out
ID: kafka/group-join-timeout
80%修复率
85%置信度
1证据数
2024-03-15首次发现
根因分析
消费者未能在配置的会话超时或max.poll.interval.ms内加入消费者组。
English
Consumer failed to join the consumer group within the configured session timeout or max.poll.interval.ms.
官方文档
https://kafka.apache.org/documentation/#consumerconfigs_session.timeout.ms解决方案
-
增加 max.poll.interval.ms 以允许轮询之间有更多时间,例如 props.put("max.poll.interval.ms", "600000"); -
减少 max.poll.records 以每次轮询处理更少的记录,例如 props.put("max.poll.records", "100"); -
使用单独的线程进行处理并更频繁地调用 consumer.commitAsync()。
无效尝试
常见但无效的做法:
-
85% 失败
Increasing session.timeout.ms alone doesn't fix slow processing; it only delays the timeout.
-
90% 失败
Restarting the consumer doesn't resolve the underlying cause of slow processing or network issues.