Pm2 graceful restart to improve user interface and avoid problems

Is there a way to do an elegant pm2 restart for all nodejs processes? I'm looking for something like Apache's elegant restart . Want to avoid killing server execution for each code deployment.

+4
source share
1 answer

pm2 restart kills and restarts the process.

If you turned on the clusters, you can perform a hot reboot with downtime of 0 s. pm2 reloadshould be enough for most cases.

: pm2 gracefulReload, , Apache. , .

: http://pm2.keymetrics.io/docs/usage/cluster-mode/#graceful-reload

+7

Source: https://habr.com/ru/post/1611520/


All Articles