Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
10
rated 0 times [  16] [ 6]  / answers: 1 / hits: 74763  / 8 Years ago, thu, may 12, 2016, 12:00:00

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 some time it randomly stops the process and my site goes down. I have to manually ssh into my server to run it again by doing:



forever restartall


And then it goes backup. Is there any way by which I can define a timeout, lets say if the server/website does not respond for 200 in 5 sec, then restart all forever process automatically?



I am new to this, if any one can give me step by step example for my case, it would be awesome.


More From » node.js

 Answers
62

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.


[#62198] Wednesday, May 11, 2016, 8 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
leslijessalyng

Total Points: 650
Total Questions: 85
Total Answers: 109

Location: Croatia
Member since Mon, Sep 6, 2021
3 Years ago
leslijessalyng questions
Fri, Feb 21, 20, 00:00, 4 Years ago
Tue, Jul 30, 19, 00:00, 5 Years ago
Fri, Jul 5, 19, 00:00, 5 Years ago
Wed, Mar 13, 19, 00:00, 5 Years ago
;