# org.apache.kafka.common.errors.CoordinatorLoadInProgressException: The coordinator is loading and cannot process requests

- **ID:** `kafka/coordinator-load-in-progress`
- **Domain:** kafka
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

Group or transaction coordinator is still loading state from internal topics (e.g., __consumer_offsets) after a leader election or broker restart.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Kafka 3.3.0 | active | — | — |
| Kafka 3.4.0 | active | — | — |
| Kafka 3.5.0 | active | — | — |

## Workarounds

1. **Wait for coordinator to finish loading; check broker logs for 'Finished loading offsets from __consumer_offsets'.
Command to monitor:
kafka-consumer-groups --bootstrap-server localhost:9092 --group my-group --describe --members --verbose
If loading takes too long, increase offsets.load.buffer.size in broker config:
echo "offsets.load.buffer.size=10485760" >> config/server.properties
kafka-server-start.sh config/server.properties** (85% success)
   ```
   Wait for coordinator to finish loading; check broker logs for 'Finished loading offsets from __consumer_offsets'.
Command to monitor:
kafka-consumer-groups --bootstrap-server localhost:9092 --group my-group --describe --members --verbose
If loading takes too long, increase offsets.load.buffer.size in broker config:
echo "offsets.load.buffer.size=10485760" >> config/server.properties
kafka-server-start.sh config/server.properties
   ```
2. **Use exponential backoff in consumer retry logic to avoid overwhelming the coordinator.
Code example:
int retries = 0;
while (retries < 5) {
  try {
    consumer.poll(Duration.ofMillis(1000));
    break;
  } catch (CoordinatorLoadInProgressException e) {
    Thread.sleep((long) Math.pow(2, retries) * 1000);
    retries++;
  }
}** (80% success)
   ```
   Use exponential backoff in consumer retry logic to avoid overwhelming the coordinator.
Code example:
int retries = 0;
while (retries < 5) {
  try {
    consumer.poll(Duration.ofMillis(1000));
    break;
  } catch (CoordinatorLoadInProgressException e) {
    Thread.sleep((long) Math.pow(2, retries) * 1000);
    retries++;
  }
}
   ```

## Dead Ends

- **Restart the consumer application immediately** — Consumer restart does not speed up coordinator loading; it only retries the same request. (90% fail)
- **Delete __consumer_offsets topic to reset state** — Deleting internal topics corrupts the cluster and causes data loss for all consumer groups. (99% fail)
- **Reduce offsets.topic.num.partitions to 1** — Changing partition count requires cluster restart and does not fix loading speed. (80% fail)
