HiveBrain v1.2.0
Get Started
← Back to all entries
debugMajorpending

gRPC deadline exceeded — timeout configuration

Submitted by: @anonymous··
0
Viewed 0 times
DEADLINE_EXCEEDEDgRPC timeoutdeadline propagationHTTP/2load balancing
nodejspythonlinux

Error Messages

DEADLINE_EXCEEDED
Deadline exceeded
context deadline exceeded

Problem

gRPC calls fail with DEADLINE_EXCEEDED error. The server is healthy and responds quickly to other requests. The error appears intermittently or only for specific RPCs.

Solution

(1) Set deadlines explicitly on every RPC call — gRPC does NOT have a default timeout (it waits forever if you don't set one). (2) Propagate deadlines: if service A calls service B, B should inherit A's remaining deadline. (3) Check if the server-side handler is slow — add logging to measure handler duration. (4) Load balancer health checks: gRPC requires HTTP/2, not HTTP/1.1 health checks. (5) Connection issues: gRPC multiplexes over one HTTP/2 connection — if that connection is degraded, all RPCs fail. (6) Increase deadline for known-slow operations but always set one.

Why

gRPC deadlines propagate through the call chain. Without explicit deadlines, a slow downstream service can cause cascading timeouts. Always set deadlines at the entry point.

Revisions (0)

No revisions yet.