# org.apache.kafka.common.errors.FetchTimeoutException: Fetch request timed out after 30000 ms for partition my-topic-0

- **ID:** `kafka/consumer-fetch-timeout`
- **Domain:** kafka
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 75%

## Root Cause

The consumer's fetch request to the broker exceeded the configured timeout due to network congestion, broker overload, or a slow partition leader.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| kafka 3.0.0 | active | — | — |
| kafka 3.3.0 | active | — | — |
| kafka 3.5.0 | active | — | — |

## Workarounds

1. **Increase the broker's 'fetch.purgatory.purge.interval.requests' and tune 'num.network.threads' to handle more concurrent fetch requests, reducing queue delays.** (80% success)
   ```
   Increase the broker's 'fetch.purgatory.purge.interval.requests' and tune 'num.network.threads' to handle more concurrent fetch requests, reducing queue delays.
   ```
2. **Add a retry mechanism in the consumer with exponential backoff on FetchTimeoutException, and reduce fetch.min.bytes to allow smaller, faster responses.** (85% success)
   ```
   Add a retry mechanism in the consumer with exponential backoff on FetchTimeoutException, and reduce fetch.min.bytes to allow smaller, faster responses.
   ```

## Dead Ends

- **** — This only masks the timeout and can lead to increased consumer latency and backlog, without fixing the underlying network or broker issue. (40% fail)
- **** — Restarting re-establishes the connection but does not resolve persistent network or broker load issues; the timeout will recur. (70% fail)
