tencent cloud

피드백

Consumer Group Constantly in PreparingRebalance Status

마지막 업데이트 시간:2024-01-09 14:57:56

    Issue Description

    A consumer group is constantly in PreparingRebalance status.

    Possible Causes

    1. A new consumer joins the consumer group.
    2. A running consumer stops running and leaves the consumer group. Common causes for this include consumer restart, consumer application crash, and heartbeat timeout of consumer process reporting. For more information, see Configuration Guide for Common Parameters in CKafka.
    3. The number of partitions changes (partitions are added or deleted).

    Solutions

    Rebalancing is inevitable in cases 1 and 3. Normally, rebalancing can be completed in 30s. If there is a longer rebalancing process, submit a ticket for assistance.
    If the rebalancing is caused by heartbeat timeout or excessive interval between two polls, you can adjust the following parameters:
    # Consumer timeout period when the Kafka consumer grouping mechanism is used. If the broker does not receive the heartbeat of the consumer within this period, the consumer will be considered to have failed and the broker will initiate the rebalancing process. Currently, the value of this parameter must fall between 6,000 (value of `group.min.session.timeout.ms`) and 300,000 (value of `group.max.session.timeout.ms`) in the broker.
    session.timeout.ms=10000
    
    # Interval at which the consumer sends a heartbeat when the Kafka consumer grouping mechanism is used. The value of this parameter must be smaller than `session.timeout.ms`, typically less than one-third of it.‌
    heartbeat.interval.ms=3000
    
    # Maximum interval allowed for calling the poll again when the Kafka consumer grouping mechanism is used. If the poll is not called within this time period, the consumer will be considered to have failed and the broker will reinitiate rebalancing to assign the partitions to other consumers.
    max.poll.interval.ms=300000
    If a consumer subscribes to many topics, you can try reducing the topics to which the consumer group subscribes.
    문의하기

    고객의 업무에 전용 서비스를 제공해드립니다.

    기술 지원

    더 많은 도움이 필요하시면, 티켓을 통해 연락 바랍니다. 티켓 서비스는 연중무휴 24시간 제공됩니다.

    연중무휴 24시간 전화 지원