What is the difference between pm2 restart and pm2 reload

前端 未结 1 436
旧巷少年郎
旧巷少年郎 2020-12-29 18:32

I have a nodejs app running on server.

When should I use pm2 restart,and when should pm2 reload be used?

Referred to the pm

相关标签:
1条回答
  • 2020-12-29 18:58

    The difference is documented here:

    As opposed to restart, which kills and restarts the process, reload achieves a 0-second-downtime reload.

    The latter means (found here):

    With reload, pm2 restarts all processes one by one, always keeping at least one process running.

    It also states that:

    If the reload system hasn’t managed to reload your application, a timeout will fallback to a classic restart.

    0 讨论(0)
提交回复
热议问题