# DEADLINE_EXCEEDED: grpc: deadline exceeded after 100ms while waiting for server to respond

- **ID:** `grpc/grpc-deadline-too-short`
- **Domain:** grpc
- **Category:** runtime_error
- **Error Code:** `EDEADLINE`
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

The client's configured RPC deadline (timeout) is too short for the server's processing time, causing premature cancellation.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| gRPC v1.62.0 | active | — | — |
| gRPC v1.59.0 | active | — | — |
| gRPC v1.55.0 | active | — | — |
| Python gRPC v1.60.0 | active | — | — |

## Workarounds

1. **Increase the client-side deadline to a reasonable value, e.g., from 100ms to 5000ms, using `withDeadlineAfter(5000, TimeUnit.MILLISECONDS)` in Java or `timeout=5` in Python.** (92% success)
   ```
   Increase the client-side deadline to a reasonable value, e.g., from 100ms to 5000ms, using `withDeadlineAfter(5000, TimeUnit.MILLISECONDS)` in Java or `timeout=5` in Python.
   ```
2. **Profile server-side latency and optimize slow endpoints (e.g., add caching, async processing) to reduce response time below the deadline.** (80% success)
   ```
   Profile server-side latency and optimize slow endpoints (e.g., add caching, async processing) to reduce response time below the deadline.
   ```

## Dead Ends

- **Increasing server timeout setting (e.g., grpc-timeout header)** — The deadline is client-side; server ignores client deadline if it's not propagated. (75% fail)
- **Disabling deadline entirely on the client** — gRPC requires a default deadline; setting to infinite can cause resource leaks. (70% fail)
