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
"pm2 reload" while reload in progress leads to zombie processes and pm2 errors #2951
Comments
pm2 reload
while reload in progress leads to zombie processes and pm2 errors
pm2 reload lock via timestamped lockfile added, to try it: $ npm install Unitech/pm2#development -g
$ pm2 update
# Try to start two pm2 reload in same time
$ pm2 reload all & pm2 reload all |
@Unitech It didn't helped me, it created another instance of app, so in |
Published on PM2 2.6.0: $ npm install pm2@latest -g
$ pm2 update |
Big thanks for this quick fix! We tested it in our environment and the problem does not appear anymore. |
What's going wrong?
When you send pm2 a
pm2 reload app
while apm2 reload app
is still in progress it leads to errors and zombie processes of the app that are not visible inpm2 list
but inps aux | grep node
. The pm2 daemon IMHO should not reload the app if a reload is in progress.How could we reproduce this issue?
pm2 logs
pm2 reload app
on terminal 2, and shortly after that executepm2 reload app
on terminal 3In my test it resulted in this error:
And the pm2 reload stopped, but this error starts to fill the pm2.log:
After that there are 8 instances in
pm2 list
but more than 8 inps aux | grep node
and they seem to still respond to connections so that some are working on an old version of the code and some on the new version if there is a code change that triggered the reload.Supporting information
I think the only option to handle this is to no let the pm2 god daemon reload if it is already reloading. But maybe there are other ideas/options.
The text was updated successfully, but these errors were encountered: