Skip to content
MtrXTools

ECONNRESET

Connection reset by peer

Seen in Node.js, Python (ConnectionResetError)

The other side (or something in between) abruptly closed the connection.

Common causes

  • The server crashed or restarted mid-request.
  • An idle timeout on a load balancer or NAT closed a kept-alive connection.
  • A firewall or IPS cut the connection, or a TLS mismatch made the server hang up.

How to fix it

  1. Check server logs at the time of the reset.
  2. Retry idempotent requests, and keep client keep-alive timeouts shorter than the load balancer's.
  3. Test TLS settings and look for security devices on the path.
Test the HTTP response

Got a different message? Paste it into the error explainer.

Related errors

All 19 Network errors