Hi there,
Not sure if the issue has already been opened, yet I wasn't able to find it.
I am wondering what is the difference between a pm2 update and pm2 restart commands? Sometimes, our PM2 based application fails to restart when using a simple restart command. Relaunching it manually with update seems to fix the issue.
Here is our restart command:
cd ${shell pwd}/../.. && pm2 startOrRestart current/config/pm2/myApp-preproduction.json
pm2 dump
The cd part is here to exit our releases/XXX folder. Otherwise, we have other reload issues due to Capistrano like deployments.
Any insights on it? Should we always use update? Any drawbacks? :)
pm2 update will restart the whole daemon, that means saving all processes configuration, restarting the daemon then starting all processes from the state saved.
If you have problem with restart, you can still pm2 delete the app you want and then restarting them.
Most helpful comment
pm2 updatewill restart the whole daemon, that means saving all processes configuration, restarting the daemon then starting all processes from the state saved.If you have problem with restart, you can still
pm2 deletethe app you want and then restarting them.