Getting thousands of HTTP errors 509, but origin seems fine

I’m suddenly getting thousands of HTTP errors 509 from the origin server… however, the origin server seems totally fine. I definitely don’t understand what could cause this.

The web server is hosted on MS Azure and there are no bandwidth limits I’m aware of.
The website is a standard Wordpress website hosted on a Ubuntu Linux VM with NGINX: there are no bandwidth and/or rate limits on NGINX as well.

What could be the problem?

If these errors are comming FROM the origin I guess there is nothing Cloudflare can do. If these errors are triggered at Cloudflare this should be debugged.

Could you please post a URL which produces these errors or the full header of such a Error 509 request?

I don’t know them, because these errors are hit by Cloudflare (I guess): all I get on my side is the typical Cloudflare 523 - Unable to connect, with a RayID. No headers, nothing else.

So if Cloudflare returns s 523 it cant return a 509 at the same time. Probably its “converting” the 509 in your backend to a 523.
For error 523 please read here Community Tip - Fixing Error 523: Origin is unreachable or here https://support.cloudflare.com/hc/articles/115003011431#523error

Lets check if the 509 error is comming from your origin, there are multiple ways for this:

  1. pause Cloudflare and call the Page again
  2. create a DNS entry which is :grey: and not :orange: and point him to your origin, then call it.
  3. use your local hostfile to set the domain to the real IP of your origin server/service and call it.

I personally recommend option 3 as it does not affect any other user, just your local machine. After you have done the test please report back if the origin directly responded with a 509 error.

Here some other posts about 509 Error, seems like it is indeed about Bandwidth/Ratelimit:

  1. error 509 - Too many connections on server
  2. 509 error for images
  3. Error 509 exceed bandwidth limit

Thanks for the suggestions,

option #3 is perfect (dont’ know why I didn’t think about that myself… guess the “unavailability panic” doesn’t help :slight_smile: ). Just tried that, here are the results:

  • direct IP connections (HOST files): → 100% OK, all 200s (all good)
  • connections through cloudflare: → 20% OK, 80% 523 (definitely not good)

It basically looks like the issue is with Cloudflare: if I turn it off, it would probably disappear.

I’m also starting to think that errors 509 aren’t connected to the issue, since cloudflare now is ALSO starting to report some 523 errors in the error page: hence it seems we’re not facing a 509 from origin → a 523 from cloudflare (as I initially guessed).

Any idea?

Would you mind sharing the Domain/URL?

Like I mentioned above. Error 523 means: Cloudflare can not reach your origin for whatever reason.

1 Like

I will do that, but I’m unable to PM you: shouldn’t I be able to?

PMs are only open for upper level users. You’d have to post the domain here if you want more specific help.

Problem seems solved for now. The suggestions from @M4rt1n here and in PM were pivotal for understaing what happened and provided great insights: thank you!

1 Like

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