How to configure Upstart for Node js to respawn the process that is killed due to some error

I am new to Server side of things .

I want respawn my killed node js server which occurred due to some error.

I looked into forever but i want to use upstart any help is appreciated

1 Answer

You can read the official documentation under respawn chapter:

If you already have a config file for your node service, how may have only to add the following line :

respawn limit COUNT INTERVAL | unlimited

Where COUNT is the number of respawn until the service is kept death (or replace by unlimited) and interval is the number of second between a retries (useful to prevent too many restart and killing your server resources if the service doesn't stay up).

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like