2
I have a Nodejs application that when crashes with some error in the controller the server stops and says that it is waiting to fix the error in order to restart the application. How do I restart it again after some unexpected error?
2
I have a Nodejs application that when crashes with some error in the controller the server stops and says that it is waiting to fix the error in order to restart the application. How do I restart it again after some unexpected error?
1
Ideally, while your project is being developed, you detect all the relevant exceptions to your system and treat them to prevent the process from dying from silly errors.
But, unexpected mistakes can happen in production. In order to keep your system on the air, you can use a process manager to monitor it. There are some done in Node even as the pm2 and were to review, and others like the supervisor.
Browser other questions tagged javascript node.js
You are not signed in. Login or sign up in order to post.
Wouldn’t it be better if you put an Englishman in your
process
of the kinduncaughtException
? So every exception not captured by a Try/catch block will be captured by Event Listener, your application will not break and you will not need to restart the whole process.– Andre
So, but the right one is to actually crash the server, so you fix the problem with the utmost urgency
– Sorack