The Deploy Finished but the Response Was Lost: How Not to Run the Same Job Twice

When only the completion response is lost, the retry button causes a second outage. Three situations that look identical on the central screen, how to tell them apart from records on the target server, and how one execution ID turns retries into a single run.

John Baek
John Baek
Founder, CollabOps
2 min read

The portal on production server A was restarted, but the deploy screen showed "response timed out." The operator hit retry, and the service that had just come back up went down again. If the original command was lost, retrying is the fix. If only the completion response was lost, the same button causes another outage.

For a retry to be safe after a lost response, it must reuse the same execution ID, and the target server must check its own record for that ID first. The central screen alone cannot distinguish a lost command from a lost response.

Why do three situations look the same from the center?

In all three cases the central view shows "no result." The difference lives on the target server.

What happened, in orderWhat the center seesWhat to check on the target
① Connection dropped while sending → request never arrivedNo resultIf there is no execution record, claim the right to run once under the same job ID
② Target ran and stored a completion record → response lostNo resultReturn the stored result for that job ID
③ Target agent died right after the restart → no completion recordNo resultCompare the last record with the actual process state; if still unclear, hold for confirmation

Retries must carry the same job ID

If the approved deploy is R-83 and "apply build 219 to the portal on server A" is one job, every network retry uses the same execution ID. The target writes that ID to storage that survives a restart, and makes sure that even two simultaneous copies of the request start only one run. If the same ID arrives with a different target or version, you need a basis for treating it as a separate request. AWS explains, in its write-up on making retries safe with idempotent APIs, why callers supply the identifier and why a different input under the same identifier is rejected.

What if not even a completion record was written?

The third row is the hardest. Writing the execution record and restarting a service at the OS level usually aren't one transaction. If the process dies after recording "running", the record alone can't tell you whether the restart happened.

If the goal was to serve build 219, you can check whether that instance answers business requests as 219. If the job was a restart of a service already running the same version, the build number isn't enough. You need the process start time or a generation counter.

When evaluating a deploy tool, go beyond the happy path where the success response arrives and set up a run where the service started fine but only the completion response was lost. If pressing retry doesn't trigger a second restart and instead retrieves the result of the run that already finished, you're close to a button the night shift can press without worrying. What to do when a multi-server rollout is stopped halfway continues in Stopping a rollout vs. rolling back when only some servers changed.

  • #deployment
  • #sre
  • #idempotency
  • #incident
  • #reliability