Skip to content
EN
Get Started

Connection Timeout

A connection timeout occurs when a client can't establish a network connection before its time limit expires, so the request ends without an HTTP response.

Table of Contents (8 sections)

Where a connection timeout happens

A connection timeout is reported by your browser, app or networking library. It isn’t an HTTP status sent by the website. Most connect timers cover opening a TCP connection, though some tools also include DNS lookup, proxy negotiation or TLS setup.

A proxy adds another hop. Your client can time out while reaching the proxy server, or the proxy can fail to reach the target. In the second case, the proxy might close the connection, report its own error or return a gateway status.

Common causes

  • Wrong host or port. The client is connecting to an incorrect or unavailable endpoint.
  • Silent packet filtering. A firewall may drop connection attempts instead of rejecting them immediately.
  • Unavailable endpoint. The proxy, target server or an intermediate network can be down or overloaded.
  • Network delay or loss. High latency and packet loss can prevent the handshake from finishing in time.
  • A short timeout. A limit that works on a local route may fail on a longer proxy route.

How to fix a connection timeout

  1. Find the failing phase. Enable verbose logs and check whether the client resolves the hostname, opens a socket and reports Connected.

  2. Verify the endpoint. Copy the proxy host and port again, then confirm that DNS resolves and your firewall permits the connection.

  3. Test each path. Try another target through the same proxy. If permitted, compare it with a direct request to separate a proxy problem from a target problem.

  4. Set realistic limits. Keep the connection limit separate from the total request limit. Use your actual proxy endpoint in place of this example address:

    curl -v --connect-timeout 10 --max-time 30 \
      -x http://198.51.100.10:8080 https://example.com/
  5. Retry carefully. Use a small retry limit with exponential backoff and jitter. Reduce concurrency if timeouts rise under load, and don’t repeatedly retry a site that is signaling limits.

Failure What you observe Reported by
Connection timeout No connection before the deadline Client or tool
Connection refused Immediate socket rejection Host or network
Read timeout Connected, but data didn’t arrive in time Client or tool
504 Gateway Timeout An HTTP response with status 504 Gateway or proxy

FAQ

Is a connection timeout an HTTP status code?

No. It is a client-side networking error, usually produced before any HTTP response arrives. A 504 is different because a gateway established a connection with you and sent an HTTP response.

Does a connection timeout mean my proxy is blocked?

Not necessarily. A firewall may silently drop the proxy’s traffic, but wrong settings, downtime, packet loss or an overly short timeout can produce the same result.

Will increasing the timeout fix connection timeouts?

Sometimes. A longer limit helps slow but working routes, but it won’t fix a wrong port, failed DNS lookup or unreachable endpoint. Overly long limits also leave workers waiting on dead connections.

Related Terms

View All Terms