How common is it to restart a NodeJS app?

42 views
Skip to first unread message

lawrence...@gmail.com

unread,
May 6, 2017, 6:32:15 PM5/6/17
to nodejs
I'm reading up on debates about what sort of restart programs people use with NodeJS. So for instance:


Some people like pm2, or Upstart, or Supervisord. 

Do you keep track of how often your app dies and is restarted? 

Of the die/restart cycle, how much is deliberate on your part (an Erlang style fail fast philosophy) versus how much is s a total surprise? 

For those of you who have apps that die often, what are the circumstances that cause it to die often? 



Zlatko

unread,
May 7, 2017, 10:47:16 PM5/7/17
to nodejs


On Sunday, May 7, 2017 at 12:32:15 AM UTC+2, lawrence...@gmail.com wrote:
Do you keep track of how often your app dies and is restarted? 


Nope, not directly. But I do scan the logs from time to time to check if there's something unusual (including restarts).

 
Of the die/restart cycle, how much is deliberate on your part (an Erlang style fail fast philosophy) versus how much is s a total surprise? 

I try to make any restart explicitly because of a new deploy. If my app is restarting on its own occasionally, it's a bug and I try to find it and fix it f I see it.
 


For those of you who have apps that die often, what are the circumstances that cause it to die often? 


Usually bugs. An uncaught error in init, somewhere where I rely on a third-party site and it's module, but those break and I didn't try/catch this (because I didn't read the docs and saw that they might, or because they didn't document it at all), things like that.

HTH.

lawrence...@gmail.com

unread,
May 9, 2017, 9:31:18 PM5/9/17
to nodejs
Thank you for that. 
Reply all
Reply to author
Forward
0 new messages