Random 520 error, appearing very occasionally

About three days ago, my site started to display error 520 in a strangely random way. I use a VPS server on Hostgator for my wordpress site.

I have made absolutely no changes to any kind of configuration on my server, it’s been a long time since I last did. As I said, the error just started to happen out of nowhere.

I can’t purposely reproduce the error. I have already opened 150 pages on my website quickly, one after the other, without the error appearing. And sometimes, I’m using my site normally, I open a page and the error comes up.

The error doesn’t happen with a high frequency, on the contrary, it’s totally possible to browse my site without the experience being harmed by the error, because as I said, it appears very occasionally.

I’ve already checked the cpanel error log, and there apparently isn’t showing anything about the problem. I’ve been using cloudflare for two years now, and it’s the first time I’ve been dealing with it.

It is important to mention that as soon as the page is refreshed, the error disappears. After refreshing the page, the site continues to function normally, with good performance and no slowdown issues.

Im from São Paulo, Brazil.

Other suggestions posted involve disabling HTTP/2 at the server. Are you able to do this? So far, no recent post I’ve seen has tried the “No HTTP/2” potential fix.

1 Like

This post was flagged by the community and is temporarily hidden.

Hi @comunidade.simstime,

Due to the number of 520s being reported in similar circumstances, we are escalating the issue to Cloudflare Support. The original incident should have been resolved and your issue may well be unrelated.

We recommend checking these troubleshooting tips, if you haven’t already.

If you have been through these thoroughly and are not seeing corresponding issues on your network/server and you have a ticket number with Cloudflare, please reply and post that #.

To enable efficient troubleshooting by support, please ensure you include the following on the ticket:

  • example URL(s) where you are seeing the error
  • Ray IDs from the 520 pages
  • output from a traceroute from any impacted user
  • output of example.com/cdn-cgi/trace - replace example.com with the affected domain.
  • Also include two HAR file(s) : one detailing your request with Cloudflare enabled on your website and the other with Cloudflare temporarily disabled - see How do I temporarily deactivate Cloudflare ?
3 Likes

Hello,

I am an administrator of a hosting provider, a Cloudflare partner and I have been getting constant complaints from our customers regarding the 520 error.
This happens randomly and we don’t find any information in the logs and all Cloudflare IPs are allowed in the firewall.
Our company and clients are located in Brazil.

1 Like

E aí, tudo bem?! Então…

Uma série de pessoas diferentes tem relatado há vários dias aqui no fórum problemas com o erro 520 aparecendo de forma aleatória, sem um padrão específico. Pelo que parece, é um problema do Cloudflare que está afetando usuários do plano gratuito (eu incluso).

Como você pode ver no comentário acima, o problema já foi escalado para o suporte há uns três/dois dias, devido a grande quantidade de pessoas que relataram o erro em circunstâncias similares.

Acho que estão analisando!

2 Likes

As shared by @matteo if you are still see intermittent 520s after following the troubleshooting tips to fix the 520s, please reach out to Cloudflare support with the additional information in the post. You are welcome to share the ticket number with us on here.

2 Likes

Error 520: web server returns an unknown error

Error 520 occurs when the origin server returns an empty, unknown, or unexpected response to Cloudflare.

Resolution

A quick workaround while further investigating 520 errors is to either grey cloud the DNS record in the Cloudflare DNS app or temporarily pause Cloudflare.

Contact your hosting provider or site administrator and request a review of your origin web server error logs for crashes and to check for these common causes:

  • Origin web server application crashes
  • Cloudflare IPs not allowed at your origin
  • Headers exceeding 16 KB (typically due to too many cookies)
  • An empty response from the origin web server that lacks an HTTP status code or response body
  • Missing response headers or origin web server not returning proper HTTP error responses

520 errors are prevalent with certain PHP applications that crash the origin web server.

If 520 errors continue after contacting your hosting provider or site administrator, provide the following information to Cloudflare Support:

What is your domain?