1

I have an application which writes to a datastore, so I attempt to send an HTTP request out to the datastore (hbase + stargate). ETIMEDOUT exception, which kills the process.

I have .on('error') on every socket connection present or at least seemingly present, including requests and responses. I even took an extreme step and make a change to the source code, which is supposed to "ignore" those errors in the third post:

http://comments.gmane.org/gmane.comp.lang.javascript.nodejs/25283

I even have a

process.on('uncaughtException', function(){})

All of this still to no avail, and my processes keep dying. Potentially losing everything that built up in the ZMQ stream queue.

The weirdest part yet is that one server out of the 4 server cluster, behaves just fine.

mdahlman
  • 9,204
  • 4
  • 44
  • 72
Bryan
  • 717
  • 6
  • 20
  • It is occurring somewhere, the backtrace is not helpful at all. I'm just for an error event on all request/response/socket handlers that i see in my code, hoping to catch it somewhere. – Bryan Oct 21 '11 at 14:55
  • Have you tried node 0.6? The HTTP client code has been substantially rewritten for 0.6. – Matt Ranney Nov 15 '11 at 09:33
  • Advice is to upgrade to the latest node, because previous versions had problems with stability. You better still catch `uncaughtException`, and restart your HTTP streams in that case – Dan Mar 30 '12 at 10:58

1 Answers1

0

I had a like-issue with our datastore that relied on HTTP requests.

How are you sending the "HTTP request out"? Is it with a library? Have you tried putting a timeout limit on the HTTP request to avoid the ETIMEDOUT exception? Although this does not address the main issue, it will give you the ability to catch the timeout by throwing your own controlled exception.

astone26
  • 1,222
  • 11
  • 16