# DEADLINE_EXCEEDED: client idle timeout exceeded

- **ID:** `grpc/deadline-exceeded-client-idle-timeout`
- **Domain:** grpc
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 88%

## Root Cause

gRPC client channel idle timeout (default 30 minutes) expired before any RPC was made, causing the channel to close and pending calls to fail.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| gRPC v1.60.0 | active | — | — |
| gRPC v1.65.0 | active | — | — |
| gRPC-Java v1.62.0 | active | — | — |

## Workarounds

1. **Disable idle timeout: set channel argument 'grpc.idle_timeout=0' (Python: 'grpc.insecure_channel(target, options=[("grpc.idle_timeout", 0)])') to keep the channel open indefinitely.** (95% success)
   ```
   Disable idle timeout: set channel argument 'grpc.idle_timeout=0' (Python: 'grpc.insecure_channel(target, options=[("grpc.idle_timeout", 0)])') to keep the channel open indefinitely.
   ```
2. **Enable keepalive pings to prevent idle timeout: configure 'grpc.keepalive_time_ms=10000', 'grpc.keepalive_timeout_ms=5000', and 'grpc.keepalive_permit_without_calls=1' to maintain channel activity.** (85% success)
   ```
   Enable keepalive pings to prevent idle timeout: configure 'grpc.keepalive_time_ms=10000', 'grpc.keepalive_timeout_ms=5000', and 'grpc.keepalive_permit_without_calls=1' to maintain channel activity.
   ```
3. **Schedule a periodic health check RPC (e.g., every 20 minutes) to reset the idle timer; use a lightweight 'HealthCheck' service call to keep the channel alive.** (80% success)
   ```
   Schedule a periodic health check RPC (e.g., every 20 minutes) to reset the idle timer; use a lightweight 'HealthCheck' service call to keep the channel alive.
   ```

## Dead Ends

- **** — Reducing the RPC deadline (e.g., from 10s to 5s) doesn't fix the idle timeout; the channel still closes after the idle period. (95% fail)
- **** — Increasing client keepalive time (e.g., 'grpc.keepalive_time=10s') without enabling keepalive ping prevents timeout because keepalive is disabled by default for idle channels. (80% fail)
- **** — Recreating the channel on each RPC avoids idle timeout but introduces high latency and resource overhead, potentially causing other errors like 'RESOURCE_EXHAUSTED'. (70% fail)
