1

I run a node process (websocket server) on an AWS instance. I used to start it like this:

node websocket/index.js

But have recently swiched to using daemontools supervise to run this process so that it respawns if it should quit or die for any reason.

So, I now run the process like this (from within the dir): supervise . &. The following is my ./run file:

#!/bin/sh

node websocket/index.js

This generally works well. When I manually kill -9 the Node process to test out it out, Supervise respawns it correctly.

However, every morning when I check in on things, the Node process and the Supervise process are both dead and nowhere to be found in ps. I confirmed that the system is not rebooting by looking at uptime.

How can I find out why the Supervise and Node processes are dying overnight? And how can I prevent this?

David
  • 2,430
  • 2
  • 15
  • 13

1 Answers1

0

Update: I switched to using the node module forever to keep my process running, and it has been great so far.

https://www.npmjs.com/package/forever

David
  • 2,430
  • 2
  • 15
  • 13