520 error appear random

hello. that’s about 1month that my website users have 520 error on some pages
that’s usually on a heavy page and that is for random users.
I was really upset about this
Thank you very much for checking
For example, I will send you a sample

this error disappear when i deactive cloudflare

1 Like

A 520 error means that your server sent something that Cloudflare did not know how to handle. Do you have any server logs from the same time that you see a 520 error?

1 Like

my website base on wordpress
what kind of log do you need ?

any other idea?

this problem appear in long posts
i don’t know why but i don’t have this issue in medium or small posts
what can make this problem
?!
really need your help

Hi, please provide the domain, thanks.

1 Like

hi. here you are.
https://dlfars.pw

site is using litespeed…
may be that related to this

I assume more processing power (PHP) is needed to generate them?

Try using some caching plugin for WordPress (at least the one to generate .html pages and serve your posts as “Page Cache version” to your visitors - below plugin as an example), if that would be the case.

I would also suggest to tune-up your PHP settings (see below which PHP variables and values to set if possible).

Otherwise, if you could check your firewall if Cloudflare is allowed to connect/send the requests to your origin host / server.
Or, rather it could also be the issue with SSL certificate (HTTPS).

Does your hosting provider have ModSecurity enabled?

Furthermore, kindly re-check if Cloudflare is allowed to connect to your origin host to as follows in the below article:

Nevertheless, Cloudflare IP addresses list can be found here:

Does anything appear in your server access / error log, or have you tried to enable WordPress Debugging?

Which WordPress version are you running?
Which PHP version?

Kindly, re-check with your hosting provider / or cPanel if available to you if all the needed PHP modules/extensions are enabled.

Also, if PHP settings are set to the right one, like values of:

memory_limit (256M)
max_execution_time (300)
max_input_time (1000)
max_input_vars (5000 or 7000)
post_max_size (16M)
upload_max_filesize (16M)

Regarding Cloudflare 520 error, may I suggest you to try looking into below articles to troubleshoot the issue:

Before moving to Cloudflare, was your Website working over HTTPS connection?
May I ask what SSL option have you got selected under the SSL/TLS tab at Cloudflare dashboard for your domain ( Flexible, Full, Full Strict … )?

Here is a way to re-check if you correctly setup the SSL for your domain with Cloudflare:

Last but not least, kindly have a look here for more information regarding correct SSL settings at the SSL/TLS tab on Cloudflare dashboard:

2 Likes

This is to thank you for devoting your time to answering my questions and helping me to increase my knowledge on this matter.
I checked all the steps, everything looked absolutely right
But I realized the problem
The list of IPs announced by Cloud Flair does not seem to be complete
And I added some IPs to the list
It seems that the problem is solved now
when i assured to this, I will announce the list of IPs

1 Like

this problem dose not fix
can this cause by cloudflare limitS?

In terms of?

I am experiencing this too, randomly but 2 out of 3 attempts its returning me 502, but server resources are below 20% usage, and application has been untouched and without weird errors in the log.
Would love to know how to know if it is CloudFlare or something else the 502 page referencing the host is not that much helpful in this case.
Thank you!

i don’t know exactly
i mean may be free version has limits on connections or some thing else

You mean Cloudflare Free plan?
I do not belive this is the thing, as far as I have 70 websites on Free plan. No issue at all.

Only the origin host / server could limit number of possible established/new connections from people, or like comming from Cloudflare, if so.