21

Wonder why Cloudflare throws an error on my server which is up? I can verify the server is up by visiting the ip in my browser.

I checked system log, apache log, no error found. Btw, I just set the domain on a static site.. I can't figure out how to fix it. Googled and found no solution

mkSmith
  • 215
  • 1
  • 2
  • 5
  • 2
    I guess you may have to check the Cloudflare support page for this: [Error 524: A timeout occurred](https://support.cloudflare.com/hc/en-us/articles/200171926-Error-524-A-timeout-occurred) – Tom Udding Apr 19 '17 at 08:00

4 Answers4

23

A 524 error states that CloudFlare was able to make a TCP connection to the origin, but the origin did not reply with a HTTP response before the connection timed out. This means that CloudFlare is able to make a network connection to the origin server, but the origin server took too long to respond to the request.

https://support.cloudflare.com/hc/en-us/articles/200171926-Error-524-A-timeout-occurred

  • Thanks for the link. It's also important to quote this line from that link: _"If you regularly run HTTP requests that take over 100 seconds to complete (for example large data exports), move those processes behind a subdomain not proxied (grey clouded) in the Cloudflare DNS app."_ – Eje Mar 21 '20 at 09:00
11

If your process take more than 100 seconds (1.67 Minutes) then CloudFlare throws an error, This link resolves in PHP.

Adhemar
  • 387
  • 5
  • 12
  • 2
    @Adhemar Thanks for the sugestion, I added str_pad('', 4096, "\n"); but I still seem to be getting the origin timeout error at 100s is there something else I need to do? – Mike Feb 13 '19 at 22:48
  • it's not working – Damonsson Oct 13 '22 at 16:57
0

In PHP app this could be that session don't return data - It hang on because of cookies. Clear application data to create new session and try again.

Official for default and free is 100 seconds before Cloudflare send this header. For enterprise there is 524 to max 600 seconds option (not default)

Patryk
  • 329
  • 3
  • 12
0

Sometimes Cloudflare throws 524 an error on the server because your IP address is blocked by Cloudflare. For looking for how to increase time best to first check if your IP address is not locked by Cloudflare.

heySushil
  • 493
  • 7
  • 13