# Vercel Functions now support graceful shutdown

By Steven Van · 2025-09-08

Node.js and Python functions get a 500ms SIGTERM window to close connections or flush logs before termination.

Vercel Functions that run on Node.js and Python can now shut down gracefully instead of stopping immediately. When a function is terminated, such as during scale-down, the runtime sends a **SIGTERM** signal, and the function gets up to **500 milliseconds** to run cleanup tasks like closing database connections or flushing external logs before it ends.

Using it means listening for the signal in the function code, for example process.on('SIGTERM', ...) in Node.js. [Read the announcement](<https://vercel.com/changelog/vercel-functions-now-support-graceful-shutdown>) on [Vercel](<https://creatorstoolbox.com/tools/vercel>)'s changelog for the code sample and a link to more on the SIGTERM signal.

![Vercel](<https://www.google.com/s2/favicons?domain=vercel.com&sz=128>)

Vercel

The platform for frontend developers — deploy, preview, and scale web apps and AI agents with zero config.

[View Vercel →](<https://creatorstoolbox.com/tools/vercel>)

[Original source](<https://vercel.com/changelog/vercel-functions-now-support-graceful-shutdown>)

[Read Vercel Functions now support graceful shutdown on Creators Toolbox](<https://creatorstoolbox.com/blog/vercel-vercel-functions-now-support-graceful-shutdown>)

---
Canonical source: https://creatorstoolbox.com/blog/vercel-vercel-functions-now-support-graceful-shutdown
