HTTPSConnectionPool: Max retries exceeded (SSLError) SSL / TLS Origin: Network Last updated 4 Nov 2026

Python requests: HTTPSConnectionPool(host='api.example.com', port=443): Max retries exceeded with url: /v1 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] ...')))

The requests call failed during the TLS step and exhausted its retries; the real reason is in the nested SSLError text.

Exact message you may see HTTPSConnectionPool Max retries exceeded with url Caused by SSLErrorrequests.exceptions.SSLError: HTTPSConnectionPoolMax retries exceeded with url (Caused by SSLError(SSLCertVerificationErrorrequests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED]Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER]
Seen on: SSL Python

Meaning

Read the bracketed text: CERTIFICATE_VERIFY_FAILED means trust, WRONG_VERSION_NUMBER means port/protocol, EOF means the peer closed, tlsv1 alert means protocol mismatch. Fix according to that cause; avoid verify=False except in short local tests.

Common causes

  • Missing/old CA bundle (certifi)
  • Corporate proxy with its own root
  • Server using an unsupported TLS version
  • Wrong URL scheme/port
  • Self-signed server certificate

⚡ Quick fix

  1. Update certifi and requests
  2. Set REQUESTS_CA_BUNDLE=/path/ca.pem for corporate CAs
  3. Use the nested message to pick the right fix from the pages above

Detailed fix by platform

Python

  1. REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt python app.py

How to diagnose

  1. Nested — Which SSL reason?
  2. Bundle — Updated?
  3. Proxy — Involved?

🔧 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):

1003 — Cloudflare Error 1003: Direct IP access not allowed (Cloudflare)10031013 — Cloudflare Error 1013: HTTP hostname and TLS SNI hostname mismatch (Cloudflare)1013AH01909: server certificate does NOT include an ID which matches the server name — Apache: [ssl:warn] AH01909: example.com:443:0 server certificate does NOT include an ID which matches the server name (SSL / TLS)AH01909: server certi…CAA record forbids issuance — Let's Encrypt/CA: CAA record for example.com prevents issuance (SSL / TLS)CAA record forbids is…CERTIFICATE_VERIFY_FAILED — SSL: CERTIFICATE_VERIFY_FAILED / unable to get local issuer certificate (API)CERTIFICATE_VERIFY_FA…EOF occurred in violation of protocol — Python: ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2396) (SSL / TLS)EOF occurred in viola…SSL routines: wrong version number — OpenSSL: error:1408F10B:SSL routines:ssl3_get_record:wrong version number (SSL / TLS)SSL routines: wrong v…SSLCertificateFile: file does not exist — Apache: AH02240: Server should be SSL-aware but has no certificate configured / SSLCertificateFile: file '/etc/ssl/x.crt' does not exist or is empty (SSL / TLS)SSLCertificateFile: f…HTTPSConn…

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.