Server Unreachable for | Error 521: Web server is down

I’m getting these emails from Cloudflare with possible origin server unavailability for two of my sites (hosted on the same server) for two weeks now. But on checking my server logs, both the sites are healthy. There were no outages either. I have verified that my SSL certificates are good too.

Is this a false positive?

I’ve never received email from Cloudflare when I’ve had a server outage. How did you sign up for these notices?

How did you verify that there were no outages? I use UptimeRobot and it’s pretty good about letting me know quickly when something is wrong.

I don’t remember how I signed up for the Cloudflare alerts.

Regarding the verification of the outages, these are the steps I followed.

  1. I do have UptimeRobot enabled. - No reports. The monitor shows 100% uptime for the last 30 days. Down monitors show 0 events.
  2. Checked for any errors in the error logs. - None.
  3. Checked for any restarts, OOM, or other critical events. - None.
  4. Immediately when I received the email, I visited my sites. - They worked.
  5. Also, upon receiving the emails multiple times, I repeated steps 2 and 3. - No errors.
  6. Also, when I received the mail, I checked my real-time analytics in Google Analytics, user activity seem normal.

I am not sure why Cloudflare would report my sites are down though.

Hi @kenlocked, those are new alerts, no sign up but you can opt out. Some details, Community Tip - Email alert, origin unreachable

1 Like

Thanks @cloonan. But I do want to be notified in the event of server issues. And in my case, I would like to know if there is really an issue with my origin server or is it a false positive that I can ignore.

I know I’m drifting a bit, but…ohhhh, those are Load Balancer alerts? You’re running a load balancer?

If so, then I suspect your site will still appear to work, as the load balancer should route traffic to the server that it thinks is up.

Ah, no. I don’t use a load balancer. It’s just one server, with two low traffic sites and two more extremely low traffic sites via virtual hosts.

I have enabled Cloudflare for all four sites, but I am receiving the alert only for the low traffic sites (never at the same time from both the sites though). And I have never received the alerts for the other two extremely low traffic sites.

I may have not read closely enough. The article starts off talking about Load Balancer alerts, then goes on to say there are new alerts, beginning this month. I suspect it’s system-wide for any type of server, load balanced or not, that Cloudflare can’t reach.

Maybe it’s just a system glitch.

1 Like

Not load balancing, just monitoring origin availability and notifying when it is unreachable for more than 5 minutes.

Unreachable from where? If this is like other 521 errors, it could be just rate limiting kicking in, or anything else in that 521 article. Does Cloudflare double/triple check from other sources that the server is actually down?

If the servers are unavailable for more than 5 minutes, there must be a log of some events or at least a report from services like UptimeRobot right? Apache logs don’t show any events. UptimeRobot shows 100% uptime. No SSL errors either. Cloudflare IPs are not rate limited either.

Hi @kenlocked, picking up on your false positive comment, can you verify if the IP address in the email is actually your origin IP? And yes, your origin logs should show. I’ll collect more details on the checks and add them here.


Yes, the issue is related to the IP address associated to this email ID on Cloudflare.

1 Like

Update and possible solution:

I believe the reason why Cloudflare gets 5xx is that fail2ban has banned CF’s IPs. If anyone lands here via search, I hope this would be helpful. This couldn’t be the only issue, but for me, I guess this is the issue. Follow the steps here to restore visitor’s original IP, so fail2ban will stop banning Cloudflare’s IP addresses.

1 Like

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