SC300 means every tested request finished, but the service process was still
running when shutdown.deadlineMs ended. Something in the application remains
open after the HTTP drain.
| Code | SC300 FAIL |
|---|---|
| Stage | Process exit |
| CLI exit code | 1 |
| What it means | The process was still running when the shutdown deadline passed. |
| Message |
|
| First thing to check | Close the server, database pools and timers, and let the event loop empty, or exit explicitly once cleanup is done. |
What keeps Node.js running?
- The HTTP server was never closed.
- A database pool or queue consumer is still connected.
- An interval, watcher, or background worker is active.
- Cleanup is waiting on an operation with no timeout.
- A package-manager or shell wrapper is still running.
How do I fix it?
Log the start and end of every shutdown step. Close resources in an order that
does not block active requests, and add timeouts to external cleanup. Let the
event loop empty naturally; avoid process.exit() because it can interrupt
pending output and requests.
Raise deadlineMs only when the cleanup time is expected and still fits below
the platform's termination limit.
How do I find the open handle?
Add a log before and after each close operation. In a development-only run, inspect active handles or temporarily remove cleanup steps until the process exits, then restore them one by one.
After the fix, process exited — code=0, signal=none appears before the
deadline. If the process exits but the port remains open, continue with SC302.