I did experience the 520 error once recently but I cannot reproduce it, even if I keep refreshing the page.
You might not be able to reproduce it every time. A 520 from Cloudflare could literally mean any error returned by the Webserver. It could be a timeout, it could be a partial response before Cloudflare TImeout ended, It could also be PHP returning an error.
Hi, i'm getting a lot of 520 errors with cloudflare lately (i'm running OLS 1.7.5 and litespeed plugin for wordpress). Not sure when it started, but it's a couple weeks maybe.
I activated debug in OLS server and noticed some SSL errors so I decided to lower SSL settings to "Flexible mode" in cloudflare (before that it was set to "Strict Mode"). I didn't see any errors since.
520 errors are very hard to debug because cloudflare says it's a unexpected error. Can someone share his experience and some hints if SSL is causing some problem ?
Thanks
However, SSL won't be the issue, in this case, Setting SSL to Flexible just makes Cloudflare send HTTP requests instead of HTTPS, and I believe that is just a coincidence. First of all, the actual Webserver error should be figured out.
To investigate such an issue, it is always best to check the server resources by simply using the
top
command on your server to see if it is an overload issue, In addition, tail the server logs to see if any errors comes at the same time, which should tell you more about the exact error which is happening. If you are a Cloudflare Business or Enterprise customer, Cloudflare should also be able to provide you with logs pertaining to what exactly happened then with the origin.
If the 520 error is easily reproducible, It is very easy to locate what is happening by simply disabling Cloudflare right at that moment(Grey Cloud), and then get the actual error from the Webserver, If not, the only way is to fiddle through the logs and figure out the actual error first.