# ERR I/O threads pool exhausted: no available thread for connection

- **ID:** `redis/io-threads-pool-starvation`
- **Domain:** redis
- **Category:** resource_error
- **Error Code:** `ERR`
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Redis's I/O threads configuration has too few threads to handle the current connection load, leading to thread pool starvation.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 6.2 | active | — | — |
| 7.0 | active | — | — |
| 7.2 | active | — | — |

## Workarounds

1. **Increase the number of I/O threads in redis.conf: io-threads 8 (adjust based on CPU cores) and restart Redis.** (85% success)
   ```
   Increase the number of I/O threads in redis.conf: io-threads 8 (adjust based on CPU cores) and restart Redis.
   ```
2. **Reduce the number of concurrent connections by implementing connection pooling in client applications, e.g., using a pool with max 50 connections per client.** (80% success)
   ```
   Reduce the number of concurrent connections by implementing connection pooling in client applications, e.g., using a pool with max 50 connections per client.
   ```
3. **Enable I/O thread read/write by setting io-threads-do-reads yes (if not already enabled) to distribute load more evenly.** (75% success)
   ```
   Enable I/O thread read/write by setting io-threads-do-reads yes (if not already enabled) to distribute load more evenly.
   ```

## Dead Ends

- **Increase maxclients to allow more connections.** — This does not increase the number of I/O threads; it only allows more connections to queue up, worsening the starvation. (70% fail)
- **Disable I/O threads entirely by setting io-threads to 1.** — This removes the thread pool but shifts all I/O to the main thread, potentially causing CPU bottlenecks and higher latency. (50% fail)
- **Restart Redis to clear the thread pool state.** — The pool exhaustion is due to configuration and load, not a transient state; restarting only provides temporary relief until the same load returns. (80% fail)
