Troubleshooting5 min readNovember 13, 2026

Why Websites Time Out: How to Diagnose Slow Connections and Failed Requests

Learn what causes DNS, TCP, TLS, and application timeout errors, how connection timeouts differ from HTTP 504 gateway timeouts, and how to test them with curl.

Key Takeaways
  • Why a slow website is not the same as complete service unavailability.
  • How DNS, TCP, TLS, application, and gateway timeouts fail at different layers.
  • Using curl --connect-timeout and --max-time to isolate where a request stalls.
  • Practical steps for both visitors and server administrators.

Introduction

A timeout occurs when one side of a network conversation waits for a response that does not arrive within an allowed time limit. Instead of returning a quick error like 404 Not Found, the browser spins for seconds before reporting ERR_CONNECTION_TIMED_OUT or a gateway timeout.

Because timeouts can happen at almost any stage of a connection, distinguishing slow performance from a total outage—and locating where the request stalled—is key to solving the problem.

1. Slow Performance vs. Complete Unavailability

A website that takes 4 seconds to respond is degraded or slow, not completely unavailable. Only when a request exceeds a client, browser, or gateway timeout limit does it turn into an outright failure.

Different tools enforce different thresholds. For example, ItsUporDown’s backend probe applies an 8-second timeout, whereas desktop browsers and reverse proxies often wait 30 to 60 seconds or more. That means a slow server can time out in an 8-second probe while still eventually loading in a patient browser.

2. Where Timeouts Happen Along the Connection Path

Timeouts appear at five distinct stages:

  • DNS lookup timeouts: Your device’s recursive resolver cannot reach the domain’s nameservers (or your device cannot reach the resolver itself), stalling before an IP address is known.
  • TCP connection timeouts (ERR_CONNECTION_TIMED_OUT): Your device sends a TCP SYN packet to the resolved IP, and no SYN-ACK returns. Common causes include silent firewall drops, offline hosts, routing blackholes, or severe packet loss.
  • TLS handshake stalls: TCP connects, but the TLS negotiation stalls due to MTU/fragmentation issues, middlebox interference, or overloaded server crypto workers.
  • Application response timeouts: TCP and TLS finish, and the HTTP request is sent, but the backend server takes too long to generate the first byte of the response.
  • Browser request timeouts & HTTP 504 Gateway Timeouts: A browser cancels a stalled request locally, or a CDN/reverse proxy gives up waiting on an origin server and returns HTTP 504.

3. Gateway Timeout vs. Connection Timeout

These two errors sound alike, but they point to different failures. A connection timeout (no HTTP code, browser shows ERR_CONNECTION_TIMED_OUT) means your browser could not even establish a TCP connection to the server or CDN edge.

A 504 Gateway Timeout means your browser connected cleanly to the CDN or reverse proxy, and that proxy actually returned a valid HTTP 504 response—meaning the delay happened behind the proxy between the edge and the origin server.

Timeout SymptomLayer Where It FailsWhat Connected Successfully
DNS lookup timeoutName resolutionNone—domain IP could not be obtained from resolver
ERR_CONNECTION_TIMED_OUTTCP transportDNS succeeded, but no TCP handshake completed
TLS handshake stallEncryption negotiationDNS and TCP connected, but TLS did not finish
HTTP 504 Gateway TimeoutProxy-to-origin upstreamDNS, TCP, TLS, and reverse proxy all connected

4. Packet Loss, Routing, and CDN-to-Origin Timeouts

Intermittent timeouts often trace back to packet loss on wireless links, congested ISP peering points, or asymmetric routing. In CDN architectures, static cached pages may load quickly from the edge while dynamic API or checkout requests time out waiting for a busy origin database or cold serverless function.

5. Isolating Connection vs. Response Timeouts with curl

You can separate a TCP/TLS connection stall from a slow server response using curl’s two timeout flags. The command below uses https://example.com as an illustrative example:

  • --connect-timeout 5 limits only the connection establishment phase (DNS, TCP, and initial connection setup). If curl aborts within 5 seconds with a connection timeout, packets are not reaching an open port on the target.
  • --max-time 15 caps the entire operation, including waiting for the HTTP response and downloading the body. If TCP and TLS succeed quickly in verbose output (-v) and the command pauses until second 15, the server is reachable but slow to respond.
  • Limitation: A single curl test reflects only your current network path and local conditions; running the same test from another network or checking with ItsUporDown helps confirm whether the stall is regional or server-wide.
bash
curl -v --connect-timeout 5 --max-time 15 https://example.com

6. Troubleshooting Steps for Visitors and Administrators

Choose the next step based on whether you are a visitor or the site operator:

RoleWhat you observeRecommended next step
VisitorConnection times out on Wi-Fi but loads on mobile dataDisconnect VPNs, test another DNS resolver, or restart your router; contact your ISP if multiple domains stall
VisitorSite returns 504 Gateway Timeout across networksWait briefly and avoid rapid retries; check the site’s status page or contact support
AdministratorTCP connection times out externallyCheck firewall security groups, load balancer listeners, host health, and server CPU/network saturation
AdministratorHTTP 504 or slow TTFB under loadInspect slow database queries, exhausted worker/connection pools, upstream API latency, and proxy timeout thresholds

Frequently Asked Questions

Why does ItsUporDown say a site timed out after 8 seconds when it eventually loads in my browser?

ItsUporDown’s server probe enforces an 8-second timeout to prevent checks from hanging indefinitely. A severely overloaded website that takes 12 seconds to answer can fail the 8-second probe while still loading slowly in a browser.

What is the difference between curl --connect-timeout and --max-time?

--connect-timeout sets the maximum time allowed just to establish the connection, while --max-time caps the total time for the entire HTTP transfer.

Can firewall rules cause a timeout instead of Connection Refused?

Yes. Firewalls configured to silently drop packets (DROP rather than REJECT) cause clients to wait until the timeout expires, whereas an immediate rejection returns Connection Refused.

Suspect an outage on a website right now?

Run an on-demand DNS and HTTP check using our website status tool.

Run Status Check