5

We currently use pm2 to keep our nodejs process alive, we don't use the cluster mode (and the related load balance feature).

Our php team uses supervisord to manage their php process alive, as laravel suggests. Now we are investigating the possibility of using supervisord to manage our nodejs process too. We mainly need 2 things from a process manager, keep a process alive and log the event when it crushes and restarts.

In term of keeping a process alive I do find pm2 & supervisord share some similarity. But pm2 have more restart policies, e.g. pm2 has a CRON time which supervisord doesn't have (correct me if I am wrong). Without cron time feature we will have to just resort to cronjob, so it is a nice to have feature but not a must.

supervisord has process groups and priority order, which through my experience with node, I don't find many use cases.

So to us it seems doable, but we don't have enough experience with supervisord and we are afraid we may miss something here, especially the big one like you should not do that in the first place! Have anyone done this before ?

BTW, my question is kind of the opposite of Running a python script in virtual environment with node.js pm2

Qiulang
  • 10,295
  • 11
  • 80
  • 129

1 Answers1

-2

When you use pm2 or supervisord, the crash message will be hidden by pm2 or supervisord. So the key point is that when the worker crashese, you should have the ability to know it, such as to hack the pm2 program, when the worker crashes, send a message to the monitor system.

ouflak
  • 2,458
  • 10
  • 44
  • 49
  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 10 '21 at 20:21