gRPC status 4: DEADLINE_EXCEEDED
DEADLINE_EXCEEDED is gRPC status code 4. The deadline expired before the call finished. The server took longer than the time the client allowed.
Updated
Usual causes
- The server was slow: a slow query, a lock, or a downstream call that took most of the budget.
- The deadline is too short for the work, often a default copied from a faster endpoint.
- The connection could not be established in time, so the call never reached the server.
- Deadline propagation: the call inherited a nearly spent deadline from an upstream request.
What to check
- The deadline you set against the server's own latency for this method.
- Whether the server received the call at all; if it has no log line, the time went on connecting.
- Downstream calls the handler makes, since each one spends the same budget.
- Server-side, whether the operation completed anyway; a timed-out write may still have been applied.
Not to be confused with
UNAVAILABLE means the server could not be reached; DEADLINE_EXCEEDED means time ran out, whether connecting or waiting.
What it looks like
A typical error, as a Go client prints it: rpc error: code = DeadlineExceeded desc = context deadline exceeded
Retry, and the HTTP equivalent
| DEADLINE_EXCEEDED | |
|---|---|
| Code | 4 |
| Name | DEADLINE_EXCEEDED |
| In istek's status bar | deadline_exceeded |
| Retry | Only if the operation is idempotent, because it may have completed on the server. |
| HTTP status | 504 |
istek names the status of every call it makes, deadline_exceeded included, and explains transport failures in plain words. See istek.