Sometimes a CF 520 error

Typically it might well be but when many different origins start showing the same symptoms starting roughly at the same time it suggests a tiny possibility of an issue on the cloudflare side. When a stream write fails sending to client, the problem can be on the receiving OR sending side (or somewhere in between). As I said earlier, my server never even receives the requests cf returns 520 on.
Did you change anything in your software/configuration around two weeks ago? Unfortunately I don’t remember exactly when it started but according to what people write here it seems like around two weeks ago give or take a few days.

1 Like

I’m busy to make a testlocation on a similar domain. The domain on cloudflare has now been created, but unfortunately it seems my registrar has problems with changing the nameservers. :face_with_monocle:

I’ve made a ticket so they can fix it.

To be continued :grinning:

1 Like

Hi all. I don’t know if this is related. But today I have tried one of the sites (soccas.cl) with the frequent problem of the 520

3 clicks and 520 again (Ray ID: 67a9d4164f237527 • 2021-08-06 17:01:40 UTC)

Perhaps there is a relationship in how the SSL certificate is managed between cloudflare and the server.

I changed the SSL encryption mode (flexible to full)

I waited a few minutes. I surfed the site again, making over 70 clicks and no 520 have turned up.

I don’t know if it’s a coincidence, I’ll keep trying.

1 Like

@Ciris My SSL/TLS encryption mode is Full, has been since the beginning. So must be a coincidence, I’m afraid.

1 Like

@Ciris
My SSL-mode was also full.

@1blas
But on my investigation, i find this topic. Halfway through it’s about the 520 errors.

It seems that DirectAdmin installed servers with Apache are affected. In that topic calls somebody that switching to Nginx resolves the problem. (Not a best solution :sweat_smile:)

Is a setting in Apache probably the problem?
Maybe a keep-alive setting? (See link below to the post) :point_down:

1 Like

Still insecure I am afraid.

3 Likes

I have been using Cloudflare for several years, and never had any problems. And a few weeks ago, random Cloudflare 520 errors started happening.

Server logs show no errors. I’ve checked everything from the system level to the domain level.

Always Online is turned off, and I’m running Full SSL on the Cloudflare side.

I’ve looked through the Cloudflare troubleshooting guide for 520 errors, but that does not help. How can I see the exact error that Cloudflare is seeing from the web server to generate the 520 error?

1 Like

See my previous reply → Sometimes a CF 520 error - #52 by sandro

2 Likes

I tried, and changing the SSL to Full Strict does not change the Cloudflare 520 errors.

1 Like

@sandro, this thread is not about security, it’s about people getting random 520 errors regardless of their security settings.

You can’t see it on your side because your server never even receives the request from Cloudflare. At least that’s the case with me. And as far as I can see nobody in this thread explicitly confirmed they were seeing those requests in their logs, everybody just says they see “no errors”.
@1blas posted some errors from cloudflare logs a bit earlier: Sometimes a CF 520 error - #43 by blas

1 Like

For starters, 520s can still be because of broken security and, furthermore, I did not say it was about the 520s but pointed out that most people in this thread have no security in the first place.

3 Likes

Has anyone in this thread opened a ticket with CF tech support? What do they say?
I found at least six other threads here with similar symptoms started within last couple of weeks, most getting canned knee-jerk responses along the lines of “you all must be doing something wrong”, which seems to be a standard in this community…

1 Like

I use three servers with these specifications, 2x VPN and 1x physical server. Doesn’t matter how much traffic / load. Random 520.

Websites use WordPress 5.8 and WP Rocket cache + CDN.
I tested combination with and without WP rocket / CDN. Still get 520 errors.

Apache 2.4.48
DirectAdmin 1.62.4
Exim 4.91
MariaDB 10.4.20
Named 9.9.4
Php 7.4.22

1 Like

I tried again, but get no more 520 errors. Is it fixed?

1 Like

Nope, not for me - still getting random 520s…

1 Like

I would like to think we’re not that bad.

The majority of 520s are caused by issues on the origin, not with Cloudflare. At no point have we said that a Cloudflare issue is not possible. It is entirely possible that there is an issue there, or all these errors could be unrelated as we have seen here before.

As I have said several times

We have already escalated it here, staff have responded but there is a limit on how much the community can help in this case. If you want this to be investigated by staff, you need to open a ticket about it. Only general troubleshooting information can be shared here.

3 Likes

Requires PHP 7.4 with needed modules.
Not all plugins/themes are compatible yet with either that PHP or WP version.

Just in case, there were topics here how to properly setup Cloudflare with WP Rocket (if using this combination).

Furthermore, if I can share few things with which I experienced a Cloudflare 520’s few times in the start, as of:

  1. Using Flexible SSL option rather than Full (Strict) SSL - neither having an SSL certificate and HTTPS over 443 port at my server at first
  2. Not allowing Cloudflare IP’s at iptables (hopefully saving them to apply) and firewall
  3. Not having the “real visitor IP” setup propperly at Nginx web server for Cloudflare
  4. While modifying my PHP files, due to PHP-OPCache, while restarting PHP service at my server, which then in a moment catched the “error 520” as in the moment of restart I requested a webpage which was not re-generated and saved, neither served via the server as not being in the PHP-OPCache yet at that moment, etc.
  5. Having some issue between a switch of my dedicated server provider and Cloudflare, including few other people at the same hosting provider (there was a topic about it)
  6. Running WordPress with 8k+ daily visitors without using some WP cache plugin like W3TC + Cloudflare
  7. Tuning my WordPress and PHP settings for better performance and lower CPU, RAM and network usage, etc.
  8. Running a WordPress/WooCommerce on a shared cPanel hosting, where I was limited by the I/O, and memory per PHP process
  9. Running a WordPress site on a shared cPanel hosting with it’s cPanel SSL certificate, while the hosting was running Nginx and some “nginx static cache” (probbably their not so well configured Nginx over Apache using fastcgi)
  10. Running Imunify360 WebShield service (standalone installation, no panel) at my origin host, which was being enabled by default and not configuring it by adding domains and their SSL certs and keys to it which resulted as 520s too for each of the domain on the server(s)
2 Likes

I certainly didn’t mean you personally - sorry if my frustration with cloudflare not doing anything about a bug crippling many websites for over two weeks now spilled over onto those community members who really want to help.
I can’t open a ticket because I’m on the free plan and I only have two options: write here or vote with my feet. Or maybe if I upgrade to paid plan the issue will magically go away?
Here’s a screenshot from right now:

1 Like

Thank you.

I’m still not convinced of a bug in Cloudflare because of the difference in behaviour between the sites reporting this issue here. I’ll check up on the escalation and add your domain there to see if the issue can be compared to @clay.aar’s to see if there are any similarities or if they are unrelated.

3 Likes

I am willing to help with analyzing the difference in behavior. Here are the reports:

What difference in behavior?

1 Like