SC200 means an active request was still open when the shutdown deadline
ended. It did not complete and it did not fail; the connection stayed open.
| Code | SC200 FAIL |
|---|---|
| Stage | In-flight responses |
| CLI exit code | 1 |
| What it means | A request that was running when SIGTERM arrived did not complete before the shutdown deadline. |
| Message |
|
| First thing to check | Stop accepting connections with server.close() and let open requests finish; do not wait on keep-alive sockets or timers that never end. |
Why does a request hang?
- The shutdown handler waits for the request, but the request waits for shutdown cleanup.
- A database call, upstream request, or lock never finishes.
- The server stops reading or writing without closing the response.
shutdown.deadlineMsis shorter than the expected operation.- A timer or stream is left open.
How do I fix it?
- Add logs around the slow handler and each shutdown step.
- Let active handlers finish before closing their dependencies.
- Put timeouts on network, database, and queue operations.
- Set
deadlineMsabove the slowest valid request, but below the platform's termination limit.
Do not call process.exit() to clear this code. That cuts the connection and
turns the failure into SC201.
How do I verify the fix?
The timeline should show work request finished before the deadline. Add
bodyIncludes when a normal-looking response could still hide incomplete
work.
Test with the slowest valid operation, not only a fixed sleep. If external systems can stall, verify their own timeout path as a separate failure test.