Node JS auto restart all forever JS process when server goes down / crashes

前端 未结 6 1061
眼角桃花
眼角桃花 2021-02-07 05:37

I am using forever js to keep my node server running 24/7 on AWS EC2.

I use this command

forever start index.js

However, I notice that

6条回答
  •  轮回少年
    2021-02-07 06:12

    Figured it out. The problem was due to less RAM available in my EC2 instance. I upgraded RAM to 2 GB and have not experienced the crash so far.

    Node can also make uncaught exception errors but my major problem was due to less memory.

    Hope this helps others.

提交回复
热议问题