Skip to content
proxycosts
Prices checked up to Oct 24, 2026

504 Gateway Timeout through a proxy: who gave up waiting

A 504 means one server stopped waiting for another. The standard defines it as a server that, “while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request” (RFC 9110, section 15.6.5). With a proxy, the server that gave up can be your proxy, waiting for the site, or the site’s own gateway (its CDN or load balancer), waiting for its servers.

Proxy error · Last revised Oct 19, 2026

On this page

Find out who gave up

curl -s -o /dev/null -x "http://USERNAME:[email protected]:8000" \
  -w "proxy %{http_connect} site %{http_code}\n" https://the-site-you-need.com/page

On our test proxy (Oct 19, 2026), asking for an https:// address the proxy could not reach printed:

proxy 504 site 000

That 504 came from the proxy: it could not connect to the site in time. proxy 200 site 504 means the proxy connected and the 504 came from the site’s side. For a plain http:// address the proxy forwards the request itself and its 504 shows in the site column (our test printed proxy 000 site 504 for a page that took longer than the proxy’s limit), so test with https:// to tell them apart.

When the proxy gave up (proxy 504)

  1. The exit IP had a slow or broken route. Residential exits are people’s home connections, and some are slow or drop out. Rayobyte, for one, says its 504 means it “attempted multiple Residential exits but the connection could not be completed”, and that such errors “are generally temporary errors and can be retried” (Rayobyte). Retry once with a new IP (a new session in the username, or a rotating gateway); if most exits work, the plan is fine.
  2. The site is slow or blocking that network. If every exit times out on one site and others load, the site is not answering that provider’s addresses. Try another country or another proxy type before you blame the plan.
  3. The country or city is too narrow. A city with few exits leaves the proxy waiting for one. Widen to the country and compare.
  4. Your own timeout is longer than the proxy’s. Providers stop waiting after a set time. If your pages take longer (large downloads, slow searches), split the job into smaller requests.

When the site’s gateway gave up (proxy 200, site 504)

The site’s servers did not answer its own gateway in time. Load the page without the proxy: if it is also slow or 504 there, the site is struggling and only waiting helps. On a site behind Cloudflare the same problem shows as 522 or 524.

What not to do

Do not set your tool’s timeout to minutes to “wait it out”: a stuck request holds a connection your plan may count against its limit. Set a timeout (curl’s --max-time 30, Requests’ timeout=(10, 30)), retry once on a new IP, then move on.

How to test a proxy checks the connection step by step. Plans differ in how many connections they let you hold at once: concurrency limits.

Price it for your amount

Today's checkout totals, every billing type competing. Change the amount to recalculate.

Geonode

$34.65

Residential monthly subscription · Monthly

50 GB needed50 GB included
Rolls over while subscribed · 0 GB unused

Checked Oct 24, 2026 · $0.69 per GB used

Buy at Geonode →

GB and IP packages use separate amounts and billing units.

On this page