Why does my node app process keep getting stopped when I use forever?

I was able to resolve my problem thanks to this answer on a similar question: https://stackoverflow.com/a/24914916/1791634

The process kept running when I used forever start ./bin/www instead of passing app.js

It remains to be seen whether this causes any trouble down the road.


I'm guessing the process stops after you disconnect from ssh?

Try running forever with nohup first.

nohup forever start app.js

When you disconnect from ssh the server kills all your shell's child processes. nohup disconnects a process from its parent shell.