Skip to content
Preptima
hardScenarioConceptMidSeniorStaff

A gRPC call three services deep hangs, and so does everything waiting on it. What was missing?

A gRPC deadline. gRPC sets none by default, so a client waits as long as the server takes, and every caller up the chain holds a thread or stream with it. Set a deadline at the edge, propagate the remaining budget on every hop, stop work on cancellation, and retry only inside what is left.

5 min readUpdated 2026-10-09Target archetype: Big Tech, Product Startup

Answer

Short answer

A gRPC deadline was missing. gRPC does not set one by default, so a client with no deadline waits for as long as the server takes, which can be forever. When service C blocks, B waits on C, A waits on B, and each holds a thread, a stream and memory while it does. The fix is a deadline set at the edge, with deadline propagation passing a shrinking budget through every hop. Handlers must stop work when the call is cancelled, and retries must fit inside the time remaining.

Was this answer helpful?

Likely follow-ups

  • The edge has a two-second budget and the deepest service needs a database call. How much of the budget should it be allowed to spend?
  • A service in the middle publishes to a queue and a worker calls the next gRPC service. What happens to the deadline at that boundary?
  • How would you find, across forty services, the call sites that make outgoing gRPC calls without any deadline?
  • Keepalive pings are already configured. Why did they not detect this hang?

Related questions

Masterclass guide

Further reading