Error 522 - Can't find the problem


I run some WordPress websites on Google Cloud. For a few days now, I get Error 522 messages sometimes and every website is affected. Sometimes it’s loading really slow, sometimes it doesn’t load everything on the page, and sometimes I get the 522 error. I tried to replicate the error, but I cannot find a pattern.

What I have done so far:

  • Web server is ok. CPU Usage <10%, Memory Usage <30%
  • Error log is empty
  • Let’s Encrypt certificate is valid and renewed
  • Cloudflare IPv4 are whitelisted on GCP
  • Purged cache on the websites and on Cloudflare
  • When I disable Cloudflare proxy in DNS settings (gray cloud) everything works perfect and fast
  • Server has an A+ rate on without CF proxy

Here is one of the sites with Cloudflare proxy: (causing problems)
And here is one of the sites without Cloudflare proxy: (a business partner (from Germany) and I (from Spain) could not access this website this morning - blank screen on mobile (at my end) and loading forever - that’s why I disabled CF proxy).

Can anyone point me in the right direction to solve this issue?

Thank you so much!

EDIT: Here is a screen recording when the error occurred: T2G E222 - YouTube

So the issue occurs when proxying traffic through Cloudflare? P.S: Sorry for so many withdrawn posts

Yes, only then.

On this website ( I could not replicate the error. It works fine now.

But I checked this website now:
It loaded okay. So I loaded a few sites. Everything okay. Then, after about 10 pages, I got the Error 522. It happened on a page that I visited 3 times before in my testing. After reloading it worked.

Are you using a stable connection?

I’ll see how long it takes before I get the 522 error

The site returns this error

My internet connection should be stable, yes.

Also a business partner could not access one of the pages - from another location.

Are they using a stable connection? Also, which link is having problems? The link you said that you reloaded 10 times before 522 error gives me a completely different error on the first load attempt.

Sorry, typo!

Alright, I’ll see how many times I can reload before it gives the error!

I did not reload the same page again and again. I just randomly clicked on links/pages on the website forth and back. Then, this site gets the error after it showed correctly e few times before: Aus den Augen, aus dem Sinn – Abfallentsorgung auf spanisch | ByeBye Switzerland

Alright 10 quick refreshes did not show error, now i’m going to press Ctrl+reload 10 times and repeat until error

Oh then I’ve been doing it wrong! :man_facepalming:

I’ll do that, click on some of the links see how long it takes before I get the error

What links did you click before you got 522? Because I’ve been clicking random links (including the one your provided me) and still no 522

I will keep trying

I can’t remember exactly. But homepage, blog page, some posts, homepage, posts… and suddenly it happened.

I’m also trying to replicate - I don’t get the error at the moment.

That’s what is strange. It happened on most of the websites but only occasionaly.

Yeah I’m trying to replicate it too! Same result, no error

I’m busy rn, so I’ll try again later

Have you replicated it?