My http service (using both http and socket.io) had crash after run for long time. I don't know how to make this error again. Please help to know what error and any solution for it. I will deploy to Linux production server any problem with it?
events.js:160
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at exports._errnoException (util.js:1022:11)
at TCP.onread (net.js:569:26)
This kind of question belongs on the nodejs/help repo issue tracker.
The short answer though is the remote party terminated the connection abruptly while node was reading from the socket. Somewhere in your code or the code of a dependency module, an 'error'
event handler is not being added (probably to the socket object), causing the exception to be thrown.
For reference, there's quite a few people coming up against similar uncatchable errors in libraries like request
and socket.io
- they're not even catchable with process.on('uncaughtException', ...)
. Some clues here: https://github.com/request/request/issues/2161
this solution solved my problem : https://github.com/ionic-team/ionic-cli/issues/2921#issuecomment-352359738
Most helpful comment
this solution solved my problem : https://github.com/ionic-team/ionic-cli/issues/2921#issuecomment-352359738