How do I debug error ECONNRESET in Node.js?

后端 未结 14 1270
刺人心
刺人心 2020-11-22 04:02

I\'m running an Express.js application using Socket.io for a chat webapp and I get the following error randomly around 5 times during 24h. The node process is wrapped in for

14条回答
  •  后悔当初
    2020-11-22 04:39

    I was facing the same issue but I mitigated it by placing:

    server.timeout = 0;
    

    before server.listen. server is an HTTP server here. The default timeout is 2 minutes as per the API documentation.

提交回复
热议问题