Proxy Timeout: ERR_CONNECTION_TIMED_OUT and 504 Gateway Timeout
No response came within the allotted time. You need to find where the request got stuck: before the proxy, at the exit address or at the site.
Updated · Prokso editorial team
- A timeout means silence: no response arrived within the time your program waited
- A common cause is a slow exit address or a site that responds slowly
- Retry through a different address and increase the timeout in your program
What the error means
A timeout is not a refusal but silence: the program waited for a response longer than it is willing to and aborted the request. In a browser it is ERR_CONNECTION_TIMED_OUT or ERR_TIMED_OUT, in programs it is “connection timed out”, and at an intermediary it is 504 Gateway Timeout.
A request through a proxy passes three legs: from you to the gateway, from the gateway to the exit address, and from there to the site. Any of them can slow down.
Causes
- A slow exit address. Residential and mobile addresses are ordinary devices on home and mobile internet; their speed varies.
- The site responds slowly or does not respond. Overload, maintenance or a deliberate delay for suspicious requests.
- The timeout in the program is too short. Three to five seconds is often not enough for a request through a residential address.
- The connection to the gateway is closed in your network. A firewall silently drops packets to the required port.
- A heavy page. Large files and pages with hundreds of resources take longer to load than the limit.
How to fix it
- Retry the request: with rotation, it will go through a different address.
- Increase the timeout in the program to 30–60 seconds.
- On a sticky IP, change the session - take another port from the 10000–20000 range.
- Check the site without the proxy: if it is slow that way too, the site is the cause.
- If speed and stability matter, try datacenter proxies: their addresses are hosted in data centers.
- Check that the proxy port is not closed in your network: try another network.
How to check that it works
The proxy checker shows the response time. If the address responds quickly there but the program gets timeouts, increase the timeout or look for the cause on the site's side.
Two-minute diagnosis
First paste the line into the proxy checker. If the proxy works there, the cause is in your app or its settings. If not, test the line from a terminal:
curl -v -x "http://USERNAME:PASSWORD@gw.prokso.com:823" https://api.ipify.org
- A
< HTTP/1.1 407line right afterCONNECTmeans the proxy answered. The name after the code, for exampleNO_USER, points to the cause. - The proxy answered
CONNECTwith 200 and then another code arrived - the proxy works, and that answer came from the website. - No answer at all, only a timeout - the connection never reached the proxy: check the host, port and network.
Setup guides where this error comes up
FAQ
What timeout should I set in the program?
For residential and mobile addresses, 30–60 seconds per request; for datacenter ones, 15–30 is usually enough.
Is traffic charged for a request that was cut off?
Only what actually passed through the proxy before the cut-off is charged. For a request with no response, that is just a few bytes.
Timeouts happen all the time. What should I do?
Test the line in the proxy checker and the site without the proxy. If the proxy does not respond there either, contact support and give the time and the plan name.
What is the difference between a connect timeout and a read timeout?
A connect timeout means the connection was not established in time. Through a proxy this most often means the gw.prokso.com gateway is unreachable on that port: the port is wrong or your network blocks non-standard ports. A read timeout means the connection exists but the response did not arrive in time: a slow site or exit address. In Python requests the two are set separately: timeout=(10, 60) - 10 seconds to connect and 60 for the response.
Why do I get a timeout on one site only?
If other sites open through the same string, the proxy works. That site responds slowly, is overloaded or deliberately delays requests that look suspicious to it. Check it without the proxy, raise the timeout to 30-60 seconds and lower the request rate. Sometimes another exit country helps.
Timeouts on my phone, but everything works on the computer. What is wrong?
On Android and iPhone the proxy is set in the settings of a specific Wi-Fi network, and those settings only accept an HTTP proxy. So on a phone use port 823 or a sticky port from 10000-20000, not 824. If the port is right and the timeout stays, that Wi-Fi network may block non-standard ports - try another one. Step by step: Android, iPhone.
Other proxy errors
Residential $1.59, mobile $2.50, datacenter $0.65 per GB
Sign up in a minute, get access right after payment.