curl 56 SSL / TLS Origin: Network OSI layer 6 · Presentation Last updated 18 Nov 2026

curl: (56) OpenSSL SSL_read: Connection reset by peer, errno 104 (TLS connection dropped mid-transfer)

The server or a middlebox reset the TLS connection while curl was reading.

Exact message you may see curl: (56) OpenSSL SSL_read: Connection reset by peer, errno 104OpenSSL SSL_read: error:0A000126 curl 56curl: (56) Recv failure: Connection reset by peercurl: (56) OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104curl 56 SSL_read
Seen on: curl SSL Linux

Meaning

Check for server crashes, idle timeouts, rate limits/WAF, MTU problems and proxies. Retry with --retry, compare --http1.1 vs HTTP/2, and look at server logs at the same timestamp. errno 104 is ECONNRESET.

Common causes

  • Server/proxy reset the connection
  • WAF or rate limiting
  • MTU/PMTU black hole
  • Server crash/restart
  • Idle timeout on the load balancer

⚡ Quick fix

  1. Check server/proxy logs at that time
  2. Try --http1.1 and --retry 3
  3. Test MTU: ping -M do -s 1400

Detailed fix by platform

Shell

  1. bash
    curl -v --http1.1 --retry 3 https://example.com/big
    ping -M do -s 1400 -c 3 example.com

How to diagnose

  1. Server log — Reset?
  2. HTTP version — Matters?
  3. MTU — OK?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Network. Errors that are often confused with or caused by this one (click to open):

425 — HTTP 425 Too Early (HTTP)425525 — Cloudflare Error 525: SSL Handshake Failed (Cloudflare)525526 — Cloudflare Error 526: Invalid SSL Certificate (Cloudflare)526530 — 530 5.7.0 Must issue a STARTTLS command first (TLS required before AUTH or sending) (Email / SMTP)530530 5.7.0 Authentication Required — SMTP: 530 5.7.0 Must issue a STARTTLS command first / 530 5.7.1 Authentication required (Email / SMTP)530 5.7.0 Authenticat…A TLS error caused the secure connection to fail — Safari: Safari Can’t Open the Page — A TLS error caused the secure connection to fail (Browser)A TLS error caused th…bad record mac — SSL error: bad record mac (decryption failed or corrupted TLS record) (SSL / TLS)bad record macclient cert — curl: (58) unable to set private key file / could not load PEM client certificate (SSL / TLS)client certcurl 56

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.