Community Tip - Fixing Error 524: A timeout occurred

Try the suggestions in this Community Tip to help you fix Error 524: A timeout occurred.

Error 524 error indicates that Cloudflare made a successful TCP connection to the origin web server, but the origin did not reply with an HTTP response before the connection timed out. Typically, Cloudflare waits 100 seconds for an HTTP response. If the origin doesn’t respond in that time, Cloudflare closes the connection and you’ll see “Error 524: A timeout occurred”.

Quick Fix Ideas

  1. This error is commonly caused by a long-running process on the origin server, such as a PHP application or a database query which the web server must wait on before responding to a request. This can also be caused by your origin server being overloaded - so as a first step it’s a good idea to check your server’s available resources, including CPU and RAM, and overall traffic levels. If your server has a high CPU load, or is low on memory, this could indicate a resource problem.

  2. Investigate for issues at your origin server that might result in responses taking longer than 100 seconds to be generated. Ask your hosting provider/system administrator to check if there are any server issues. Reviewing your webserver access/error logs would be a good place to locate this information. If you have a Cloudflare Enterprise plan, contact Cloudflare Customer Support to make them aware of the issue to investigate options.

  3. You should check your server health metrics such as available CPU & RAM and if you’re using a Database server, that should be checked as well for long-running queries. Review your origin webserver access/error logs which may provide more information on why those requests are timing out.

  4. If you need to have scripts that run for longer than around 100 seconds without returning any data to the browser, you can’t run these through Cloudflare. There are a couple of options: Run the scripts via a grey-clouded subdomain or change the script so that it kicks off a long-running background process and quickly returns a status which the browser can poll until the background process has completed, at which point the full response can be returned. This is the way most people do this type of action as keeping HTTP connections open for a long time is unreliable and can be very taxing also.

  5. If your running a VPS, like Windows VPS, make certain to adjust the firewall at the origin to not rate limit Cloudflare’s connecting IPs.

  6. Your hosting provider has made server changes to their Railgun settings which resulted in Error 524. Go to the Cloudflare dashboard, select Speed, Railgun and test & select a working connection from the list of options.

Lite Reading

Background Resources
Help Center

Research The Issue

If You Need More Help
This community of other Cloudflare users may be able to assist you, if not, login to Cloudflare and then contact Cloudflare Support. When you contact support, make sure to include as much of this information as possible: time stamped log files from your origin server, RayID, domain name, error messages, screen shots, and/or HAR file(s).

Expert Comments Appreciated
This Community Tip will remain open for input from Community experts and those familiar with this issue. We really appreciate comments that start with words like: “The three things I always try”, or “Do this first” or “In my experience”.

This is a Cloudflare Community Tip, to review past tips click here.

Çevirmek…traduzir…翻译…traducir…Traduire…Übersetzen…:greyg: Translate this Tip

FXCTTO 101119

524 Error on My website
Timeout error 524 with subdomains
Error 524 in my site
Wordpress Duplicator Plugin
How long does it take for email support to respond?
Timeout 524
Both websites giving 524 error
Site keep getting crashed 524
I can not connect to my server
CA certificate
Email not working after add cloudflare CDN
Please check the status of Indian servers
My two website is Down
524 from specific locations and working fine on others
Community Tip - All Published Tips
My website is showing Error 524 (Godaddy, Wordpress)
Error 524 A Timeout Occured
Speed changes
HELP please 524 Error
Error 524 Ray
Error 524 getting on my php myadmin page
524 error
Site not accessible in opera mini mobile
After setting up cloudflare account, email is not working
Error 524 when cloudflare is enable
Error 524 from CloudFlare
Connection breakage between cloudflare and the server
How configure the Cloudflare Nameservers?
How configure the Cloudflare Nameservers?
Urgent fix of Error 524
Long running process
Error 524 when trying to create a new user
2 IPs Problem
Cloudflare shows an error while posting anything thing with long content
Cloudflare timeout moodle
524 Error facing
Spurious 524 timeout on login/form submission
Wordpress site really Slow and keep getting 524 timeout errors
My website always can't browsing
Webste not open
Issues in wp-admin Wordpress
Community Tip - Helpful Links, on Display
Cloudflare timeout
Error 524 when Customer opens multiple tabs at the same time
Error 524 from Argentina
Cant receive mail using contact form in my website
Site keep crashing with a 524 Error
524 timeout error CDN importing dropshipping Prestashop
524 Error increase response time from 100 than more
Hosting Error 524
Joomla administrator sections times out when trying to delete records in components
Another outage today (4th in 20 days)