5xx error information

I am getting reports from Google Search Console of “Server error 5xx” errors (Page Fetch Failed) on my two domains labelephant.com and labelephant.org, specifically for pages that require access to data on the origin server. This has only happened since I put the sites onto Cloudflare. Tech support from my host says they can find no records of the errors. The website pages appear to be working fine for me, but people world-wide visit the sites. Where do I find more detailed information about these errors, while on the Cloudflare free plan, and how can I get them fixed?

Here’s some ways to fix

1 Like

Which error code are you getting (specifically)?

Thanks, Neeraj. I had already read that, actually. But where on Cloudflare can I find information about the errors that occurred? I don’t even know what the xx is in the 5xx.

xx is a number followed by another number for example 500 (The bold print would be the xx number in this case)

Yes, I get that.

1 Like

https://support.cloudflare.com/hc/en-us/articles/203118044-Gathering-information-for-troubleshooting-sites

Greetings,

Thank you for asking.

Unfortunately, I get this on a weekly basis, but do not pay much attention to it as far as Google sometimes find some old indexed link and throws that error.

If you inspect more in details, I believe you would be able to figure out which URL is the bottleneck.

Or, the server did not responded in the needed time so Google “rendered” the webpage as returning an error for yesteday, while it may work normally today.

Nevertheless, if Cloudflare is blocking something, you should be able to see the blocked or challenged requests (events) by navigating to the Cloudflare dashboard → Firewall → Overview tab.

1 Like

Thanks for the link. From there I went to:
https://support.cloudflare.com/hc/en-us/articles/115003011431
The “Error Analytics” section gives instructions for viewing and identifying errors over time. But this is not available to me with the free Cloudflare subscription, is it, since it requires access to Cloudflare support portal?
As far as gathering information in a HAR file goes, the error doesn’t occur for me in my browser. Anyway, I don’t qualify for Cloudflare support.
Is the lesson here: get a paid subscription if you want to be able to identify and troubleshoot errors?

1 Like

Thanks, fritex, that’s good to know. I did inspect the URLs, and strongly suspect a real timeout error, since the problem pages have to get data from across the world. But I didn’t get these messages before going on Cloudflare. Does this mean that while Cloudflare is good for loading static pages quickly, it might actually be worse than the origin server alone for loading pages with data from the origin server? Do you know what the timeout is set at, and whether it can be changed?
There were no records for Action = block in Firewall Overview, but lots of JS challenges from Bot Fight Mode.

There are 2 common timeout errors! (522: Connection Timed Out and 524: A timeout occurred)!

Error 522: Connection Timed Out

Error 522: connection timed out

Error 522 occurs when Cloudflare times out contacting the origin web server. Two different timeouts cause HTTP error 522 depending on when they occur between Cloudflare and the origin web server:

  1. Before a connection is established, the origin web server does not return a SYN+ACK to Cloudflare within 15 seconds of Cloudflare sending a SYN.
  2. After a connection is established, the origin web server doesn’t acknowledge (ACK) Cloudflare’s resource request within 90 seconds.

An HTTP 524 error occurs if the origin web server acknowledges ( ACK ) the resource request after the connection has been established, but does not send a timely response.

Resolution

Contact your hosting provider to check the following common causes at your origin web server:

  • (Most common cause) Cloudflare IP addresses are rate limited or blocked in .htaccess, iptables, or firewalls. Confirm your hosting provider allows Cloudflare IP addresses.
  • An overloaded or offline origin web server drops incoming requests.
  • Keepalives are disabled at the origin web server.
  • The origin IP address in your Cloudflare DNS app does not match the IP address currently provisioned to your origin web server by your hosting provider.
  • Packets were dropped at your origin web server.

If you are using Cloudflare Pages, verify that you have a custom domain set up and that your CNAME record is pointed to your custom Pages domain. Instructions on how to set up a custom Pages domain can be found here.

If none of the above leads to a resolution, request the following information from your hosting provider or site administrator before contacting Cloudflare support:

  • An MTR or traceroute from your origin web server to a Cloudflare IP address that most commonly connected to your origin web server before the issue occurred. Identify a connecting Cloudflare IP recorded in the origin web server logs.
  • Details from the hosting provider’s investigation such as pertinent logs or conversations with the hosting provider.
Error 524: A timeout occured

Error 524: a timeout occurred

Error 524 indicates that Cloudflare successfully connected to the origin web server, but the origin did not provide an HTTP response before the default 100 second connection timed out. This can happen if the origin server is simply taking too long because it has too much work to do - e.g. a large data query, or because the server is struggling for resources and cannot return any data in time.

Resolution

Here are the options we’d suggest to work around this issue:

  • Implement status polling of large HTTP processes to avoid hitting this error.
  • Contact your hosting provider to exclude the following common causes at your origin web server:
    • A long-running process on the origin web server.
    • An overloaded origin web server.

Logging request response time at your origin web server helps identify the cause of resource slowness. Contact your hosting provider or site administrator for assistance in adjusting log formats or search for related logging documentation for your brand of web server such as Apache or Nginx.

  • Enterprise customers can increase the 524 timeout up to 6000 seconds using the proxy_read_timeout API endpoint.
  • 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.
  • If error 524 occurs for a domain using Cloudflare Railgun, ensure the lan.timeout is set higher than the default of 30 seconds and restart the railgun service.

I hope either of the dropdowns above help resolve your issue!

Thanks Apple Slayer. The tech support folks at my host have drawn a blank on the server logs for timeout errors, so I don’t know what to think. It’s hard for me to assess right now how significant the 5xx error is, or even what it is. I’ll probably revisit this at some point in the future by buying a subscription to Cloudflare, if it gets to the point where I really need to know how extensive the problem is, and where it comes from. Thanks for your help…

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.