When I turn on Cloudflare keep getting 502 and 504 errors

bug

#1

We have a Wordpress website on cloudflare and when it’s turned on we keep getting 502 and 504 errors.
When we turn cloudflare off everything works fine.
Is there a checkup tool that can help me figure out what’s wrong with my setup.
Where running out of a LAMP stack with Cpanel access and we have a SSL certificate on the website.


#2

First entry in the search :wink:


#3

Thanks Sandro, I did read that article and other articles online about that problem, but still haven’t figured out what is wrong.
That’s why I posted this on the forum, I’ve tested the website with automated tools (GTMetrix, Pingdom, Webpagetest) and nothing major shows up on those tests (with cloudflare off), when I turn cloudflare on everything stops working,


#4

To start with, whats the domain?


#5

#6

Right now your configuration looks all right. So when you switch your records to :orange: you get those errors?

That would most likely indicate some sort of network filter on your server which blocks Cloudflare from connecting. Make sure there is nothing of that sort in place.


#7

Actually I just managed to load your site over Cloudflare.

image

Are you sure the issue is still occurring for you?


#8

I have Cloudflare paused on the website:

Your site is paused

Web traffic to this website is no longer receiving performance and security benefits. Cloudflare continues to resolve the DNS. You can reactivate Cloudflare for this website at anytime. Resume Cloudflare on Site


#9

I noticed that, hence the emphasis on “over Cloudflare”. Pay attention to the IP address in my screenshot.


#10

I turned on cloudflare and in no time a 502 error showed up: Ray Id: 4afa43308ac99d20
I did a trace of the link via cloudflare:
fl=20f279
h=lev.es
ip=62.28.188.170
ts=1551266510.579
visit_scheme=https
uag=Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:66.0) Gecko/20100101 Firefox/66.0
colo=AMS
http=h2
loc=PT
tls=TLSv1.3
sni=plaintext


#11

Have you checked if you block any Cloudflare connections? Maybe you block the Dutch datacentre for some reason.

Open a support ticket and forward the 4afa43308ac99d20 connection ID. They should be able to tell why the connection didnt work.

I can still load your site.


#12

Sandro, Thanks for the help, I’ve contacted the ISP and asked if any of the Cloudflare IPs are blocked on the server.


#13

Hi Sandro,
My ISP has white labeled the IP list of Cloudflare but still when I turn on Cloudflare the 502 and 504 errors keep showing up.
Any other ideas on how to solve this error?


#14