# Kafka: CommitFailedException: Commit cannot be completed since the group has already rebalanced

**Code:** `CommitFailedException` · **Category:** API · **Seen on:** Kafka

A consumer took too long between polls, so the group kicked it out and reassigned its partitions.

## Meaning

If `poll()` is not called within `max.poll.interval.ms` (5 minutes by default), the consumer is considered dead. Its offset commit then fails because the partitions belong to someone else.

## Common causes

- Slow processing between polls
- `max.poll.records` too high for the work per record
- Long GC pauses or blocking I/O in the handler
- Session timeout too low

## Quick fix

1. Reduce `max.poll.records`
2. Increase `max.poll.interval.ms`
3. Move slow work to another thread and keep polling

## Detailed fix by platform

### Kafka consumer

1. `max.poll.interval.ms=600000` and `max.poll.records=100`

## How to diagnose

1. **Time** — Processing per batch?
2. **Setting** — max.poll.interval?
3. **Rebalance** — Logged?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/api/kafka-commit-failed-rebalance)
