-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows gracefull stop not working #4469
Comments
Fast decision, working for cluster mode and next code in your app:
In file lib/God/ActionMethods.js in God.stopProcessId function before call God.killProcess add code:
Then in file lib/God/Methods.js add new function:
Do not forget add kill_timeout into your ecosystem.config.js file or by default the application will be closed using SIGKILL after 1600ms as indicated in constants.js. |
I think for my code you can add a check for some attribute in the ecosystem.config.js, for example sendMessageBeforeShutdown: true, and add the appropriate check in the modified code in the lib/God/ActionMethods.js:
And add new attribute here indicating that only works for cluster mode. |
Issue can be closed because changes was been merged into master |
What's going wrong?
Windows graceful stop not working
How could we reproduce this issue?
Run pm2 on windows with cluster or fork mode
Supporting information
http://pm2.keymetrics.io/docs/usage/signals-clean-restart/#comment-4662727595
The text was updated successfully, but these errors were encountered: