kafka resource_error ai_generated true

org.apache.kafka.common.errors.GroupMaxSizeReachedException: The consumer group has reached its maximum size

ID: kafka/group-max-size-exceeded

Also available as: JSON · Markdown · 中文
88%Fix Rate
85%Confidence
1Evidence
2024-03-15First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.5.0 active
3.6.0 active
3.7.0 active

Root Cause

The consumer group has exceeded the maximum number of members configured by group.max.size.

generic

中文

消费者组的成员数超过了 group.max.size 配置的最大限制。

Official Documentation

https://kafka.apache.org/documentation/#brokerconfigs_group.max.size

Workarounds

  1. 95% success Increase group.max.size on the broker via kafka-configs.sh: kafka-configs.sh --bootstrap-server localhost:9092 --entity-type brokers --entity-default --alter --add-config group.max.size=20
    Increase group.max.size on the broker via kafka-configs.sh:
    kafka-configs.sh --bootstrap-server localhost:9092 --entity-type brokers --entity-default --alter --add-config group.max.size=20
  2. 85% success Reduce the number of consumer instances in the group by consolidating partitions to fewer consumers.
    Reduce the number of consumer instances in the group by consolidating partitions to fewer consumers.

中文步骤

  1. Increase group.max.size on the broker via kafka-configs.sh:
    kafka-configs.sh --bootstrap-server localhost:9092 --entity-type brokers --entity-default --alter --add-config group.max.size=20
  2. Reduce the number of consumer instances in the group by consolidating partitions to fewer consumers.

Dead Ends

Common approaches that don't work:

  1. 95% fail

    Restarting consumers individually does not resolve the underlying configuration limit.

  2. 90% fail

    Deleting offsets only resets consumption progress, not the group membership count.