"Reconnecting..." about half the time I run my node.js program

nodejs

#1

So this started happening a while back and I’ve gotten frustrated enough with its persistence to make a thread here. About 50% of the time I run my node.js program - I haven’t noticed any particular patterns in when it happens - the program starts, and then doesn’t finish. A few seconds later this appears.

It’ll then reconnect. It might happen again on the next run, it might not, but it doesn’t finish executing the program.

Here’s the error I get sometimes after it reconnects:

events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at exports._errnoException (util.js:1036:11)
    at TCP.onread (net.js:564:26)

Any idea what could be going on? :confused: