title: How to handle ECONNRESET, Connection reset by peer
body: <p>A lot of my node.js processes are crashing with the ECONNRESET error. Here's the output I can see:</p>
  
  <pre><code>node.js:50
      throw e;
      ^
  Error: ECONNRESET, Connection reset by peer
      at Client._readImpl (net:320:14)
      at IOWatcher.callback (net:470:24)
      at node.js:607:9
  </code></pre>
  
  <p>Does anyone know how to handle this? It's not a very useful stack trace so I have no idea where it's happening. Should I just wrap any and all access to a remote source via http with a try/catch block? Or is there a better way?</p>
  
  <p>In general I don't care if this does happen or if some task does not get completed because of this. What I do care about is that the process should just shrug it off and work on the next task.</p>