How do I debug error ECONNRESET in Node.js?

后端 未结 14 1454
刺人心
刺人心 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:29

    I just figured this out, at least in my use case.

    I was getting ECONNRESET. It turned out that the way my client was set up, it was hitting the server with an API call a ton of times really quickly -- and it only needed to hit the endpoint once.

    When I fixed that, the error was gone.

提交回复
热议问题