Tag
1Snippet
#Graceful shutdown

Node.js Graceful Shutdown: Handle SIGTERM in Express and Fastify
- Nodejs
- Kubernetes
- 30 Oct 2026
- 06 Mins read
Quick Tip Node's default SIGTERM handler exits immediately, so every deploy kills your in-flight requests. Here's a shutdown handler that drains them properly, in about 80 lines. The Problem