requests.exceptions.ReadTimeout
The server took too long to respond
Seen in Python requests, urllib3 (ReadTimeoutError)
The connection opened and the request was sent, but the server did not send data within the read timeout.
Common causes
- The endpoint is slow, overloaded or stuck waiting on a database or upstream.
- The read timeout is shorter than the time the request legitimately needs.
- A proxy or load balancer is holding the request without forwarding it.
How to fix it
- Measure how long the endpoint takes with curl -w "%{time_total}\n" and set the read timeout above it.
- Check server and upstream logs for slow queries or errors.
- Retry idempotent requests with backoff (urllib3 Retry).
Got a different message? Paste it into the error explainer.
Related errors
- java.net.SocketTimeoutException: Read timed out · The server took too long to send data
- context deadline exceeded (Client.Timeout exceeded while awaiting headers) · The HTTP client timed out before the response
- [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed · Python couldn't verify the server's certificate
- certificate verify failed: Hostname mismatch, certificate is not valid for · The certificate doesn't cover this hostname
- Max retries exceeded with url · requests gave up connecting to the URL
- socket.gaierror: [Errno -2] Name or service not known · Python couldn't resolve the hostname
- socket.gaierror: [Errno -3] Temporary failure in name resolution · Python couldn't reach a DNS resolver
- requests.exceptions.ConnectTimeout · Python couldn't open the connection in time
- ConnectionRefusedError: [Errno 111] Connection refused · Nothing is listening on that port
- http.client.RemoteDisconnected: Remote end closed connection without response · The server closed the connection without replying
- PKIX path building failed · Java can't build a trusted certificate chain
- javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure · The server rejected the TLS handshake