Cloudflare Error 524: A Timeout Occurred
Cloudflare connected to the site's server, but the server did not manage to send a response within the allotted time.
Updated · Prokso editorial team
- Error 524 means the site's server did not answer Cloudflare within the allotted time
- Most often it is a heavy request: a large export, unfiltered search or long report
- Reduce the size of one request: fetch data in parts, by pages, for shorter periods
What the error means
According to the Cloudflare documentation, error 524 means a connection to the site's server was established, but the server did not return an HTTP response within 125 seconds, which is the default limit. On the Enterprise plan, the site owner can increase it to 6000 seconds.
Most often the server simply does not finish in time: it is running a heavy database query, building a large report or export, or it lacks resources.
A proxy does not affect this limit. The request reached Cloudflare and the site, and the time ran out on the site's server.
Causes
- A heavy request. A large export, a search without filters, a report for a long period.
- The site's server is overloaded. Many simultaneous requests, including from your program.
- Long background processes on the server. The site runs a task that takes longer than 125 seconds within a single request.
- The site lacks resources. There is not enough memory or CPU to respond in time.
How to fix it
- Reduce the size of a single request: fetch data in parts, by pages, for shorter periods.
- Reduce the number of parallel threads to this site so as not to add to its load.
- If the site has an API with separate export tasks, use it: for long processes, Cloudflare recommends polling the status rather than one long request.
- Do not increase the timeout in the program beyond what is needed: Cloudflare will stop waiting at its own limit anyway.
- If the site is yours, look for slow requests in the server logs; the Cloudflare documentation also describes options for long operations.
How to check that it works
Run the same request with a smaller volume. If it passes and the full one gives 524 again, the issue is the processing time on the site's server, not the connection. Check the overall proxy operation in the proxy checker.
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.
FAQ
Will a different proxy or a different country help?
No. 524 depends on how long the site's server takes to process the request. The route to Cloudflare does not affect it.
How is 524 different from 504?
Both mean the intermediary did not get a reply in time. 524 is Cloudflare's own code with a 125-second limit, 504 is the standard code of any intermediary. See <a href="/en/errors/504-gateway-timeout">504 Gateway Timeout</a>.
Is traffic charged for a request that ended with 524?
What passed through the proxy is charged: your request and the error page. A response that never came is not charged.
Other proxy errors
Residential $1.59, mobile $2.50, datacenter $0.65 per GB
Sign up in a minute, get access right after payment.