# 组加入超时异常：加入组请求超时

- **ID:** `kafka/group-join-timeout`
- **领域:** kafka
- **类别:** runtime_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

消费者未能在配置的会话超时或max.poll.interval.ms内加入消费者组。

## 解决方案

1. ```
   增加 max.poll.interval.ms 以允许轮询之间有更多时间，例如 props.put("max.poll.interval.ms", "600000");
   ```
2. ```
   减少 max.poll.records 以每次轮询处理更少的记录，例如 props.put("max.poll.records", "100");
   ```
3. ```
   使用单独的线程进行处理并更频繁地调用 consumer.commitAsync()。
   ```

## 无效尝试

- **** — Increasing session.timeout.ms alone doesn't fix slow processing; it only delays the timeout. (85% 失败率)
- **** — Restarting the consumer doesn't resolve the underlying cause of slow processing or network issues. (90% 失败率)
