Node JS client library error



My Node JS script would run fine for a few hours and then stop and throw out this error.

node.js:201 throw e; // process.nextTick error, or 'error' event on first tick ^ Error: connect EMFILE at errnoException (net.js:616:11) at connect (net.js:499:18) at net.js:557:9 at asyncCallback (dns.js:84:16) at Object.onanswer [as oncomplete] (dns.js:137:9)

Does anyone know where the problem could be? Any advice please?



This looks like it may be a "too many files" issue, usually related to quickly opening and closing sockets, and not cleaning the old ones up. Are you reconnecting a lot?

Also, coud you share which version of Node.JS you are using, and which version of our Node.JS Library are you using? You can find this in the package.json file


hi Jason
Thanks for replying. My node version is 0.6.4 and the node library package is 0.1.3. I don’t see anywhere obvious that’s making a lot of reconnects. There’s consumer.connect() call, and one elasticsearch connect all, subsequently, everything else is executed within the consumer.on(“interaction”) portion of the code.


Thanks, we are looking into this. Are you running a service which other people can connect to?