How do I exit NextJS with a SIGTERM signal?
Unanswered
Irish Red and White Setter posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Irish Red and White SetterOP
Running
npm run dev
or npx next dev
starts the dev server. Sending a SIGTERM to this process does not invoke any exiting procedure - it can't shut down gracefully. Is there any way to exit it gracefully?2 Replies
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
Highlander
I’m wondering this too. There’s docs for graceful shutdown for Pages Router, but this seems to be missing for App Router
https://nextjs.org/docs/pages/building-your-application/deploying#manual-graceful-shutdowns
@Irish Red and White Setter You managed to figure this one out?
https://nextjs.org/docs/pages/building-your-application/deploying#manual-graceful-shutdowns
@Irish Red and White Setter You managed to figure this one out?
![Avatar](https://cdn.discordapp.com/avatars/678259999201427466/54265510de155a7d7909e4d21d587a76.webp?size=256)
Clown
SIGINT is probably one of the only ways to gracefully shutdown the server i think