gRPC "Deadline Exceeded": Where the Time Goes

Symptom

RpcError: 4 DEADLINE_EXCEEDED on calls that used to work.

Root cause

Server slower than the client deadline, or the deadline expires across retries/hops.

Fix, in order

1. Measure server-side handling timegrpc_server_handling_seconds # or a middleware timing log
2. Set deadlines deliberately, not defaultsstub.Method(request, timeout=5.0) # sane per-call budget
3. Propagate deadlines across services# pass the deadline with context; do not reset it per hop

Prevent it coming back

Keepalives + circuit breakers so one slow upstream cannot eat your budget.

Run it on clean infra

Spinning up a fresh box to reproduce or escape this error?

Managed cloud hosting

Related

Cloud & DevOps tool comparisons · Hardware build guides

NinjaOps publishes free engineering guides. Some outbound links are affiliate links: they cost you nothing and support the site.

Last reviewed 2026-10-02 · NinjaOps SEO grid · DevOps blog