520 Error not seeing the reason for this

Is anyone able to assist me in getting this fixed? This error has been reoccurring since yesterday. www.authenticja.com

Tengo el mismo problema que tu dassinclair007

1 Like

Wow…hope its resolved soon


Hi @dassinclair007, @rafaelma011, a 520 error can be tough to track down, any device along the way can introduce the error. Your host logs are the place to start looking for clues. In the tip below, if it’s happening all the time, I’d start with item 3 in the Tip mentioned below, make sure the cloudflare IPs are allowed to reach your server.

A 520 error occurs when the connection started on the origin web server, but that the request was not completed. The most common reason why this would occur is that either a program, cron job, or resource is taking up more resources than it should causing the server not to be able to respond to all requests properly.

Review the Quick Fix Ideas in this Community Tip for troubleshooting suggestions.

Same problem suddenly but I’m on Dreamhost (they have CF integrated in the web panel). It has been going on for about a week, totally intermittent. Page does 520, and a refresh not even a second later it loads fine. Might be fine for minutes, hours, or a day, and then get a bunch more. I did the requisite things, consulted the cloudflare docs, contacted my host, created a web browser HAR file, took screenshots, checked the server logs (no entries that correspond), and sent in a ticket to CF with all of the above attached that is unlikely to get answered anytime soon since I just downgraded from pro to free, and the ticket page basically implied that if you’re on a free plan you’re going to be waiting a while. Also found a quite a number of other posts about random and intermittent 520 errors in the 10 mins I’ve been here on the community, which is probably typical given that it’s a vague catch-all response.

How Do You Solved It ?

I’m still working on it.

Host said to switch off mod_security but we were running just fine with mod_security on for a long, long time, turning it off did nothing.

The second interesting thing I found (in multiple places) is a reference to clearing your browser’s cookies (especially Chrome) if this error is received, which seems like a pretty strange fix for an issue between CF and origin server. Didn’t work, but I didn’t actually expect it to.

The host changed the headers, still didn’t work. Checked SSL, fine. Did some tests, seems fine.

A quick google found 2 places (so far, just started looking) where cookies were mentioned with regards to 520. There can be lots of causes for error 520 though, so anyone else’s cause can be completely different. Best to start with the Cloudflare docs and community first.

A few weeks ago there was some sort of network event either on our own network or on cloudflare which caused a few people accessing our system to get 520 errors,

We know the Cloudflare published causes of this and were in contact with Cloudflare support at the time.
Whilst it is supposed to be a tcp reset, We didn’t actually find any problems at all on our network or connectivity. However due to the nature of the internet we fully understand that network events can easily happen. This is not the point of this post.

However 3 of our users were consistently getting 520 errors only on Chrome for weeks after.
That is until they cleared their cookies/cache and files on Chrome after which they did not see the error.
520 Error Cache Clearing

Seeing 520 CF error discussions all over the place.

Hi guys I am also facing the same problem from one week now, every time I get this error 520, cloud flare is saying that the issue is with the hosting provider so I contacted go daddy and they are saying that everything is fine on their side, so than they told me to change the name servers to go daddy name servers, I did that and now everything works fine, so the problem is with cloud flare, I hope they will fix it soon. I still have my cloud flare paused at the moment. please let me know if you’ll find any solution.

tenía el mismo problema y de repente se soluciono solo

Hi everyone,

We have been seeing error 520s randomly popping up on all of our systems within a group of companies for a number of days now as well. In all cases these systems previously had no issues and now do, and this is happening across a variety of web stacks, servers, and networks; the only common thing among them is CloudFlare, and in all cases the systems are functioning normally and have no log of a connection request reaching them and in many cases can see other requests arriving and being processes just fine in the same second the error occurred

If CloudFlare support sees this, the most recent user-reported screen shot shared with me shows Ray ID: 5e67ab0c59c9137a at 2020-10-23 01:26:08 UTC

Thank you

1 Like

Thanks for mentioning this. Same for us, previously no issue, nothing has been changed in CF or on the host, suddenly issues. We’ve been back and forth with both Cloudflare and the host with no resolution as of yet either. They had me try disabling mod_security, didn’t help. They modified the headers, didn’t help. Cloudflare repeated the usual information saying it is likely a problem with the host, host can’t find a problem. It is happening on more than one site on more than one different host machine for us now too.

Edit: Didn’t notice that Cloudflare tested the shared IP without SSL (which wouldn’t work) instead of the domain name provided. Now our ticket is pushed back again. We JUST downgraded our plan from Pro to free and of course that means we’re low man on the ticket-replying totem pole. Not impressed at all.

Hi guys, is the issue resolved? I tried contacting cloudflare but no response from the support. at the moment i am still using my godaddy nameservers.

Still ongoing for us. Their docs say they automatically investigate these issues but so far we’re still plagued by it.

I would make sure that’s actually a Cloudflare IP, have you checked this with Cloudflare? If confirmed why is it still unpublished? This thread was about 520 errors, are you sure your 522 errors are related?

Cloudflare employees if anyone reads this, please test the domain name instead of the shared IP (without SSL) that I never supplied to you. I supplied the domain name for a reason, please test that before kicking me the error message that results from testing the wrong thing and pushing us back in the queue again. in case some human actually reads here… and my email sits for a long time. Not upgrading back to pro for this. Already waited 5 days for the ticket to go this way. These problems started randomly with no changes to CloudFlare and no changes on the host. Intermittent, persistent 520 errors, and the only thing that has changed is we downgraded from Pro to Free. When the plan ran out, these errors started shortly after. We’re frustrated that the test that was run was run on the wrong thing…

The host checked the logs (and I attached them to my ticket). They changed the headers, disabled mod_security, and nothing made a difference. I had them check again, we went back and forth several times. I supplied them the HAR file also. They confirmed the date stamps against the logs. Nothing being blocked incorrectly, no issues with SSL. 520 happens on random URLS and 1 second later a refresh loads them fine. The host is also not seeing a reason for this. You have multiple users reporting these cropping up on a variety of different machines without reason. Then tested the wrong darned thing after 5 days of waiting and provided the expected errors when the wrong thing is tested. I supplied a HAR file with CF enabled, error happening, server logs, HAR with CF disabled, screenshots, RAY IDs, and provided:

$ traceroute example.com
$ dig example.com +trace
$ GET https://example.com/cdn-cgi/trace

Please give us something actually usable to go on here.

Still happening even just now:
Ray ID: 5e7ecdcc99bb092d • 2020-10-25 20:49:24 UTC
Ray ID: 5e7ed5177aa5092d • 2020-10-25 20:54:22 UTC

Either Cloudflare finally fixed it on their end (their docs say they automatically investigate 520’s when they arise) or clearing my Cloudflare cache has possibly resolved it somehow?!? Have been trying to provoke one all day and nothing yet since.

On my side, it was still happening one some sites but not others, but I noticed it wasn’t happening on the sites I upgraded on Friday to Pro instead of Free so that we could get better support. I upgraded another site today that was having issues and within half an hour of the upgrade to Pro the issue went away… Not what I was expecting… and it could be pure coincidence, but this is 4 for 4

CIAO ,anche io ho il problema errore 520 ma nn capisco come devo isolverlo…qualcuno mi potrebbe aiutare?

Found something on this for our instance… along with the 520s we were also having a problem with short URLs on mediawiki 1.35 clean install, loading incredibly slow on our VPS instance for no apparent reason (page loads with next-to-no-content, that normally load instantaneously, taking 1 min before browser times out). All it was was a few lines added from the MW manual to .htaccess (this account has no root access) and the MW config file, plus checked with the MW help desk to ensure my config was fine (it was). Suddenly pages are talking up to a minute to load, even though the content rendered instantly. Short URLs work fine however in 1.33 and 1.34. It was like the http protocol said the response was bigger than it was, and the browser timed out waiting for the rest of it. So, tried some curl stuff to test http http1.1 and http2 with cloudflare on:

curl -vso /dev/null --http2 https://www.mysite.com/Main_Page

As it turns out we were getting this for http2 response:

  • HTTP/2 stream 1 was not closed cleanly: INTERNAL_ERROR (err 2)
  • Curl_http_done: called premature == 1
  • Closing connection 0
    } [5 bytes data]
  • TLSv1.2 (OUT), TLS alert, Client hello (1):
    } [2 bytes data]

Turn cloudflare off, the response is fine.

Turn cloudflare back on, same bad response again, UNTIL we cleared the cloudflare cache, then it returned to normal. The site loads fine again with short URLs, and curl stops reporting problems. Remove the .htaccess url rewrite and mw short URL config (with cloudflare on, no cache clearing) site loads fine.

Strangely, disabling output compression in MW also resolved it without clearing the cloudflare cache. Related to the 520’s? Not 100% certain both have been resolved yet, though I’m hoping they are both originating from the same issue. Since we downgraded from CF Pro to CF Free, we can’t turn off http2 to test that. But, now we know we have to clear the cache anytime anything changes and the issue for us is related to http2 and/or compression. Regardless of what gets changed, http 1.1 is perfectly fine, so if we had access to disable http2 on CF it would probably be fine. We’re hoping the 520s are related to what I mention above, and have again cleared the cache after putting short URLs back in place, disabling MW’s use of output compression, and waiting to see. So far curl reports a normal response with or without output compression enabled, just the CF cache cleared.

< HTTP/2 200
< date: Wed, 28 Oct 2020 20:08:30 GMT
< server: Apache
< x-content-type-options: nosniff
< content-language: en
< vary: Accept-Encoding,Cookie,User-Agent
< expires: Thu, 01 Jan 1970 00:00:00 GMT
< cache-control: no-cache, no-store, max-age=0, must-revalidate
< pragma: no-cache
< content-security-policy: upgrade-insecure-requests;
< content-type: text/html; charset=UTF-8
{ [5 bytes data]

  • Curl_http_done: called premature == 0
  • Connection #0 to host www.mysite.com left intact

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