How do I exit NextJS with a SIGTERM signal?
Unanswered
Ratonero Mallorquin posted this in #help-forum
Ratonero MallorquinOP
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
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
@Ratonero Mallorquin You managed to figure this one out?
https://nextjs.org/docs/pages/building-your-application/deploying#manual-graceful-shutdowns
@Ratonero Mallorquin You managed to figure this one out?
SIGINT is probably one of the only ways to gracefully shutdown the server i think