Cloudflare 502 errors today WPO Wordpress

i have issues with my wordpress website today. cloudflare gives 502 error / ssl error and broken css all the time. after i do force refresh 5-6 times then the page loads but it dies again.

i am on wordpress with apo plugin and argo enabled.

anyone else has the same issues today? or anyone can help me?

i have paused cloudflare, disabled the wordpress plugin and now the site runs fine on my server.
so i am sure that cloudflare has the issue

Regarding error 502, kindly see suggestions from below articlces:

May I ask have you had an SSL certificate before moving your domain/website to Cloudflare?
Also, if so, could you check what SSL option have you got selected under SSL/TLS tab at Cloudflare dashboard?

Here is a great step-by-step article how to propperly setup the SSL with Cloudflare:

To troubleshoot SSL, kindly check below article:

Some SSL settings to re-check, if so:

Maybe you’ve got some mixed content errors? Like loading HTTP resource over HTTPS?

May I ask which APO version are you using?
Maybe @yevgen could take a note here on this topic.

Kindly and patiently wait for another reply.

the site worked fine when i re-enabled cloudflare for 5 days until today. again error 520

Error 520 Ray ID: 66025809573738db • 2021-06-16 07:32:22 UTC
Web server is returning an unknown error

i have paused cloudflare again.

i need support on this. we pay this service and it keeps crushing our website. we also have google ads running and we loose money. please help

Regarding 520, kindly may I ask if you have checked the steps from below article?:

Could you please check with your server or hosting provider if Cloudflare is allowed to connect to your origin/host?

Cloudflare IPv4 & IPv6 addresses (ranges) can be found here:

yes i have. my server works fine with no issues. there are no ssl issues, no firewall issues, cloudflare ip’s are whitelisted in csf, i use litespeed web server with increased limits, there is no caching in wordpress, i dont use litespeed plugin. everything is working. but cloudflare not.

when i pause the site for 30 minutes and i clear cache via the wordpress apo plugin then it works again. i really have read all related articles but nothing helped.

@yevgen could you maybe have some idea for a solution about this issue?

now when i login to my cloudflare dashboard i get red notifications with errors

API Request Failed: GET /api/v4/accounts/4d990ea6e0e77d99e78491e7e70002ba/flags (502)

API Request Failed: GET /api/v4/zones/f8dd6aba8d27b4e6ffd4d9ad58190068/flags (502)

API Request Failed: GET /api/v4/zones/f8dd6aba8d27b4e6ffd4d9ad58190068/settings/automatic_platform_optimization (502)

Internal authentication error: internal server error (Code: 10000)

Cloudflare is already aware of the issue

Even cloudflare DNS is also not working.

i am confident that something is happening with APO. when i refresh my site 5-6 times it loads. all other times i get broken css and Error 520 Ray ID: 66025809573738db • 2021-06-16 07:32:22 UTC
Web server is returning an unknown error

is there a way to purge WPO Cache and Cloudflare Cache every 48 hours?

If you’re seeing 520 errors that means your origin is returning something unexpected to us - the best thing to do here would be to log the cf-ray header in your origin server access logs and check the RayID from a 520 you see with the logs on your origin.

Most likely your origin is resetting the TCP connection (most common) for some reason or is returning large origin headers (less common, but still a possibility).

and how can i fix this? when i pause cloudflare everything runs fine

You need to identify why it is happening first - using the steps suggested - add the cf-ray header to your logs and check your access & error logs on the origin server when you see a 520 happening - that should reveal what is happening at the origin to cause us to return this error.

1 Like

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