Report this

What is the reason for this report?

node.js keep stopping. No errors logged.

Posted on March 10, 2015

Hi all

I am running ubuntu and use a node.js to run a small website.

I am starting the server using forever with the following:

forever start -l forever.log -o out.log -e error.log server.js

It starts fine with some warning:

warn: --minUpTime not set. defaulting to 1000 warn: --spinSleepTime not set. Your script will exit if it does not stay up…

My experience with node is limited, so I not sure if these warning matter - they sound like they do.

The server will run fine with hardly any mem usage or load on the server.

It will last a few hours then just stop with nothing in the logs to indicate any problems.

Can anyone assist me, as I in despair on what it could be.?

Best wishes all

Johnny



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

When using forever, --spinSleepTime is important to set. One of the key features of forever is that it will respawn your process if it dies for one reason or another. This only works if that option is set. It refers to the time to wait between launches of a script that is considered “spinning.” It is in milliseconds. Using something like --spinSleepTime 10000 is usually a good default.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.