Node services that ignore SIGTERM get force-killed by orchestrators/compose mid-request, dropping in-flight requests and leaking DB connections; services without health checks cannot be safely load-balanced or restarted.

nodejs · verified Jul 7, 2026

Fix: Handle SIGTERM/SIGINT: stop accepting new connections (server.close()), finish in-flight requests, then close DB pools and other resources before exiting. Expose a health-check route so the orchestrator knows when the instance is actually ready/alive.

infrastructuregraceful-shutdownhealth-check

References