Kafka Consumer Group Constantly Rebalancing

Symptom

Logs full of "Rebalance in progress"; lag grows; processing stalls.

Root cause

Consumers miss the heartbeat or take too long between polls.

Fix, in order

1. Check max poll interval vs real processing timemax.poll.interval.ms # default 5m
2. Tune the session for your networksession.timeout.ms=15000, heartbeat.interval.ms=3000
3. Cut restart churn with static membershipgroup.instance.id=<stable-id> # Kafka 2.3+

Prevent it coming back

Keep poll loops fast; heavy work goes to a queue sink, not the consumer thread.

Run it on clean infra

Spinning up a fresh box to reproduce or escape this error?

Managed cloud hosting

Related

Cloud & DevOps tool comparisons · Hardware build guides

NinjaOps publishes free engineering guides. Some outbound links are affiliate links: they cost you nothing and support the site.

Last reviewed 2026-10-02 · NinjaOps SEO grid · DevOps blog