[英]What is the difference between pm2 restart and pm2 reload
I have a nodejs app running on server. 我在服务器上运行了一个nodejs应用程序。
When should I use pm2 restart ,and when should pm2 reload be used? 我应该何时使用pm2重启 ,何时应该使用pm2重载 ?
Referred to the pm2 documention here,but couldn't figure out the difference in use case of the two. 这里提到了pm2文档 ,但无法弄清楚两者的用例差异。
The difference is documented here : 这里记录的区别如下:
As opposed to
restart
, which kills and restarts the process,reload
achieves a 0-second-downtime reload. 与restart
相反,restart
会导致重新reload
,reload
导致0秒停机重新加载。
The latter means (found here ): 后者意味着(在这里找到):
With reload,
pm2
restarts all processes one by one, always keeping at least one process running. 通过重新加载,pm2
逐个重新启动所有进程,始终保持至少一个进程正在运行。
It also states that: 它还指出:
If the reload system hasn't managed to reload your application, a timeout will fallback to a classic restart. 如果重装系统未设法重新加载您的应用程序,则超时将回退到经典重启。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.