Error AtlasError Documentation and Resolution

Node.js connection was reset by the peer

ECONNRESET: connection reset by peer

Node.js was communicating over a socket, but the remote side closed the connection unexpectedly before the exchange completed.

ECONNRESETnetwork
ECONNRESET: connection reset by peer
  • The remote server timed out, restarted, or closed the connection abruptly.
  • A proxy or intermediary terminated the socket before the response completed.
  • The client or server wrote to a socket that was already being closed.
  1. Check whether the remote service is timing out or restarting during requests.
  2. Review proxy and load balancer timeout settings between the client and server.
  3. Add retry or graceful error handling where transient connection resets are expected.
Node.js Errors
Node.js ECONNRESET connection reset by peer: causes and fixes | Error Atlas