# grpc::DEADLINE_EXCEEDED: Deadline exceeded on streaming call to /service/StreamMethod

- **ID:** `communication/grpc-deadline-exceeded-streaming`
- **Domain:** communication
- **Category:** runtime_error
- **Error Code:** `GRPC_DEADLINE_EXCEEDED`
- **Verification:** ai_generated
- **Fix Rate:** 82%

## Root Cause

gRPC client deadline configured too short or server processing too slow for streaming RPC, causing the context to expire before the stream completes.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| gRPC 1.50.0 | active | — | — |
| gRPC 1.60.0 | active | — | — |
| Envoy 1.28.0 | active | — | — |

## Workarounds

1. **Increase the client deadline for streaming calls specifically, e.g., in Go: `ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)` instead of default 5s.** (75% success)
   ```
   Increase the client deadline for streaming calls specifically, e.g., in Go: `ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)` instead of default 5s.
   ```
2. **Implement server-side streaming with backpressure using flow control: configure `grpc.max_concurrent_streams` and `grpc.initial_window_size` to avoid server overload.** (85% success)
   ```
   Implement server-side streaming with backpressure using flow control: configure `grpc.max_concurrent_streams` and `grpc.initial_window_size` to avoid server overload.
   ```
3. **Add retry with exponential backoff in the client for deadline-exceeded errors, e.g., using gRPC retry policy: `retryPolicy: { maxAttempts: 3, initialBackoff: 1s, maxBackoff: 10s, backoffMultiplier: 2 }`.** (80% success)
   ```
   Add retry with exponential backoff in the client for deadline-exceeded errors, e.g., using gRPC retry policy: `retryPolicy: { maxAttempts: 3, initialBackoff: 1s, maxBackoff: 10s, backoffMultiplier: 2 }`.
   ```

## Dead Ends

- **Increase client deadline to a very large value (e.g., 60 seconds) across all calls** — Can mask underlying performance issues and cause resource exhaustion if server is genuinely slow. (65% fail)
- **Disable deadline checking entirely in client configuration** — Removes timeout protection, leading to hung connections and cascading failures. (80% fail)
- **Restart the gRPC server without changing deadline or processing logic** — Temporary fix; deadline will trigger again if server processing remains slow. (90% fail)
