Why do i get Error 520 for 24 hours after updating my website?

After I update and publish my wordpress website for a few hours, i eventually get ERROR 520, and will no longer allow me to save or publish any edits on my website. I can browse, open any pages i want still on my website, but it will not let me publish or save any longer, for atleast 24 hours. It just says “waiting for” at the bottom of my browser then finally will timeout after 20 seconds and give me the Cloudflare error 520 screen.
My server admins checked all my logs and said they found nothing wrong, so the error must be on the Cloudflare side of things, waiting to connect back to my server.
Does anyone have any suggestions what is going on or what i should do to fix this? I tried disabling my Cloudflare account to see if that works, but everything is SSL through Cloudflare which will break the links and cause more issues. After 24 hours, whatever it is, allows me to continue editing and publishing my pages.

Do you have any Page Rules set up? You could try a general Page Rule that matches example.com/ that’s like the one below. It will disable most Cloudflare features except SSL.
Best page rules for newbies?! - #3 by jules

Yes its done this long before i ever setup SSL on my site though, right now i just have 1 page rule
http://fan-watches.com/ and “always use https”

I edit my site from around 10am til 2pm or 3pm, and thats when it finally stops, and then i can continue editing around 10am the next day. After i hit “publish” in wordpress, at bottom of browser it says “waiting for fan-watches.com” and just times out after 20 secs and gives Cloudflare 520 error unknown something.

Sounds like a firewall issue. The firewall in front of your website is probably seeing a lot of traffic from a singular IP (Cloudflare’s) which is fetching all of the resources for many users. This would place a temporary ban on CF’s IPs. Eventually CF’s cache is primed, at which time Cloudflare doesn’t need to hit your server as much, and then the temporary ban on its IP is lifted.

I whitelisted the list of CL IP addresses to my server though. Right now all the pages are working fine again since its been 24 hours (except for the one page i was editing at the moment the error happened, for some reason it will not edit or save that page or let me rename any page to that name or it will give me the 520 error again which is strange) but all other pages on the site are publishing just fine now. I dont see anywhere in my WHM server firewall where i can make any adjustments other than adding the whitelisted IP addresses.

The issue is probably at the firewall in front of your server. You’ll have to ask your hosting vendor.

server admin said there were no errors in the log file and i have my IP whitelisted

I know 520 indicates an Origin server error, but is anything showing up in your Cloudflare Firewall Events log?

nope server admins checked error logs and didnt find anything plus i have my IP whitelisted

Did you check here?

yes i have my ip whitelisted here, i have medium security, and 30 mins, browsser integrity check enabled,

We might have our lines crossed here. The 5XX error comes from your hosting facility and sent to Cloudflare. Typically that’s from an over conscious hosting firewall temporarily blocking Cloudflare. Really, every single time.

A simplified route chain is like so:
Browser -> Cloudlfare -> Hosting Provider -> ISP’s Firewall -> Your Server … and then back
We’ve always found the 5xx errors happening at the firewall in front of the web server (not the one on the web server it self, like WHM’s).

It’s Cloudflare’s IP that needs to be white listed at the ISP’s firewall. Your IP is irrelevant here.


This topic was automatically closed after 14 days. New replies are no longer allowed.