Shutdown Check

Search documentation

Find a page or section

SC310: Readiness was not withdrawn

SC310 (readiness was not withdrawn) means the readiness route still reported ready after SIGTERM, up to the deadline. Return 503 or stop listening on SIGTERM.

SC310 means the readiness route continued to report ready after SIGTERM. A load balancer may keep sending traffic to an instance that is already shutting down.

CodeSC310 FAIL
StageDraining traffic
CLI exit code1
What it meansWith readinessWithdrawal on, the readiness route kept returning its ready status after SIGTERM until the deadline.
Message
  • Readiness was not withdrawn before the shutdown deadline
First thing to checkOn SIGTERM, make the readiness route return 503 (or stop listening) so load balancers stop sending traffic.

How do I withdraw readiness?

Set a draining flag as soon as the signal arrives and return a non-ready status from the readiness route:

let draining = false;
 
app.get("/health", (_request, response) => {
  response.sendStatus(draining ? 503 : 200);
});
 
process.on("SIGTERM", () => {
  draining = true;
  server.close();
});

Closing the listener also counts because the readiness connection is refused. A timed-out readiness request does not count as withdrawal; it leaves the traffic state unclear.

How do I verify the fix?

The timeline should record readiness withdrawn soon after signal sent. Test the route manually during a controlled drain and confirm it changes from the ready status to 503 or another non-ready status.

If the application changes state but the test does not see it, check that readiness.path points to the same route used by the platform.