# API gRPC Deadlines and Cancellation Status: public Confidence: medium (0.685) (verified) Last verified: 2026-06-03 Generation: ai_structured ## TL;DR gRPC deadlines and cancellation tell agents whether an API call failed because work was impossible, too slow, abandoned by the caller, or still running without useful clients. ## Core Explanation Agents debugging gRPC systems need more than a status code. A deadline is a client-side time budget that should propagate through downstream RPCs, while cancellation can signal that the result is no longer needed. Useful evidence includes the deadline value, elapsed time, call chain, server logs after cancellation, streaming direction, retry policy, and whether handlers observe cancellation before doing expensive work. Extending deadlines blindly can hide saturation or broken fan-out behavior. ## Source-Mapped Facts - gRPC documentation says a deadline lets a client specify how long it is willing to wait for an RPC to complete. ([source](https://grpc.io/docs/guides/deadlines/)) - gRPC documentation says a server should stop work when it discovers that the RPC deadline has exceeded. ([source](https://grpc.io/docs/guides/deadlines/)) - gRPC documentation says either the client or the server can cancel an RPC at any time. ([source](https://grpc.io/docs/guides/cancellation/)) ## Further Reading - [gRPC Deadlines](https://grpc.io/docs/guides/deadlines/) - [gRPC Cancellation](https://grpc.io/docs/guides/cancellation/)