0

I'm confused on why a node.js process I started on an EC2 instance stops when my macbook lost its internet connection (went to sleep after inactivity).

My EC2 instance is running all the time, so why does a broken pipe stop processes running on it?

tim peterson
  • 23,653
  • 59
  • 177
  • 299
  • 2
    Did you start the process using ssh? if your connection goes away, the process would close if it is attached to the terminal, the same way it would go away if you closed the terminal. – Kevin B Aug 10 '15 at 22:22
  • Ok oh, now I get it. Yes, I ssh'd into the instance. So how do I keep it running? With a daemon? If so, any quick advice on how to do that? – tim peterson Aug 10 '15 at 22:33
  • 1
    [you need to run Node as a daemon.](https://stackoverflow.com/questions/4903570/how-does-one-start-a-node-js-server-as-a-daemon-process) – tedder42 Aug 11 '15 at 00:12

0 Answers0