The operating system, on either side of the connection.

ECONNRESET — connection reset by peer

The other end sent a TCP reset instead of closing cleanly. In scraping it is frequently a deliberate drop rather than a fault — some anti-bot layers reset instead of returning a status you could read.

A proxy fixes part of this. A reset from a flaky exit is fixed by retrying elsewhere. A reset that is really a block is fixed the same way as a 403, and the tell is whether it happens every time or only sometimes.

Why it happens

The target reset the connection on purpose, as a block that costs it less than serving an error page.

A residential exit disconnected mid-request.

Keep-alive reuse of a connection the far end had already closed.

A TLS handshake rejected at the transport level rather than with an alert.

How to fix it

  1. Retry with a fresh connection; do not reuse the socket that failed.
  2. Disable keep-alive if resets cluster on the second and later requests of a connection.
  3. If resets are immediate and consistent for one target, treat it as a block and change the fingerprint and the pool.

FAQ

What does ECONNRESET mean?›
The other end sent a TCP reset instead of closing cleanly. In scraping it is frequently a deliberate drop rather than a fault — some anti-bot layers reset instead of returning a status you could read. The operating system, on either side of the connection.
Why am I getting ECONNRESET?›
The target reset the connection on purpose, as a block that costs it less than serving an error page. A residential exit disconnected mid-request. Keep-alive reuse of a connection the far end had already closed. A TLS handshake rejected at the transport level rather than with an alert.
How do I fix ECONNRESET?›
Retry with a fresh connection; do not reuse the socket that failed. Disable keep-alive if resets cluster on the second and later requests of a connection. If resets are immediate and consistent for one target, treat it as a block and change the fingerprint and the pool.
Will a proxy fix ECONNRESET?›
A reset from a flaky exit is fixed by retrying elsewhere. A reset that is really a block is fixed the same way as a 403, and the tell is whether it happens every time or only sometimes.

Other errors

Stop getting ECONNRESET

Residential IPs across 199 countries, from $7.35/GB — no commitment, no monthly plan.

Get residential IPs →