502 error only on cloudflare suddenly (pausing cloudflare fixed it), no setting changed

Hi, I’ve searched through similar problems in the discussion but can’t really find the answer to this.

so yesterday my site veloved.id using Cloudflare is working normally. suddenly today it shows 502 error (which I already see the tips of the cause & how to fix)

I assumed because the disk space is full, thus I fixed it on my hosting end. After waitng a bit, still it shows 502 error. I paused Cloudflare on the site, and the site works normally.

But whenever I turn on Cloudflare again, it will shows 502 error.

since it’s been working for quite sometime without issue, it should’t be setting error on the Cloudflare side? I ask the hosting for help but basically they told me “since when pausing Cloudflare, the website works, so it’s Cloudflare’s fault, ask them”.

I tried purging the cache, turn off always online, double check if the ip is pointed to the right IP, waiting a bit for propogation,

then to make sure it’s not my computer cache, I tried it using proxy, incognito, etc, but still 502 error when enabling Cloudflare, and works when pausing Cloudflare.

Could someone point out ideas on what to test in this case?

I want to check the network panel etc from my computer browser, problem is after pausing Cloudflare and the website works, but when I enable Cloudflare again, in my computer, the website still works on my browser, but using several proxy, and testing it using geopeeker, all shows bad gateway error 502, so I know it only works on my browser, I use incognito & clear cache but still it doesn’t seems to update back to Cloudflare ip?

I appreciate any help or ideas on what to check. Thank you.

Hello there,

Give it a try

Check your Origin server for configuration
Check your DNS TTL value if you have set to Auto (recommended) or certain value
Check your server log for various reasons:
It could be due to overload, crash, traffic spike. So, it can be temporary basis on your server
If you are specifically trying from one device, clear the cache and flush DNS from system

For more guide:

*sorry I deleted the previous post since I didn’t blockquote it properly, so I formatted so it’s easier to read.

hi, thank’s for the reply.

Check your Origin server for configuration

yes, I’ve talked to the host provider, all settings is normal, site works normally when not using Cloudflare, so maybe is there something specific that you can think about the configuration? I could check it

Check your DNS TTL value if you have set to Auto (recommended) or certain value

it’s now in Cloudflare, proxied, and set to Auto

Check your server log for various reasons:

just checked it, nothing, I even insist to ask for the hosting to check what’s wrong, they say 100% nothing wrong from their side, ask Cloudflare.

It could be due to overload, crash, traffic spike. So, it can be temporary basis on your server

the site have very few visitor currently, I checked resource monitor as well, so this shouldn’t be the problem

If you are specifically trying from one device, clear the cache and flush DNS from system

I tried accessing it using multiple device, proxy, and geopeeker that check from different country, all shows bad gateway.

as for the community guide, I’ve read it carefully (as it is the only lead I have), but as the host provider says, they’re certain they’re working properly, all settings okay, ask Cloudflare.

so I’m out of lead now on what to do.

what’s the site?

it’s veloved.id

I see your site is routing through https. Have you installed SSL? or using Cloudflare?

I did, I’m using let’s encrypt, is it ssl error?

oh, it’s issued by cpanel, but yes I’m using SSL

I see that. Good. No issue with that.

Have you configured anything in htaccess files? Please have a glance

just checked it, nothing out of the ordinary,

just the usual litespeed cache entries (I’m using litespeed server), https redirect, and normal wordpress htaccess

Check your server ip if that’s well configured in Cloudflare that’s what is causing. There’s nothing seems other than it as I see as of now.

yes, I checked as well the ip is correctly point to the host ip. that is why I’m really confused on what’s wrong.

I don’t know if there’s any detail on Cloudflare where I can see more than host error.

  1. Since you are using wordpress, look for error log.
  2. What is the SSL mode you’ve set in Cloudflare?
  1. I’m looking at some place now, in the wp directory itself, in ssh, cpanel error log, but nothing.

  2. it’s now Full (Strict), but I changed it to full, & flexible, still bad gateway. I turned it to off, it couldn’t load (too many redirect), I don’t know if it’s a sign or something?

Well, here’s the possible glitch. you had configured the SSL to Full strict without the origin CA. Even the immediate changes to Full or Flexible, instantly work. Bcz, you are using Letscrypt SSL. Therefore, origin server is responding with this error.

Cheers :grinning: I see your site is working fine. Back to life!

1 Like

Hi neijay, thank you for constantly helping, yesterday I still want to continue troubleshooting the site, but I can’t reply this thread since I’m blocked by the system (it says can’t reply more, please wait 22 hours, since this is a new account). also I can’t find another way to contact you (can’t find messaging info). so I don’t have any way to let you know :zipper_mouth_face: like… being muted by the system.

unfortunately, the site works because I disable Cloudflare. I continue troubleshooting it a little bit more after that. but still 502 error. So I deleted the site from my Cloudflare dashboard and re-add it.

It still shows error, but now it’s showing different kind of error, it’s ssl handshake failed, even going to ssllabs shows the host can’t be reached.

I reach my hosting about this, but once again, they say “since if you disable Cloudflare, everything works fine, including ssl, etc, then it’s not our problem, ask Cloudflare”.

so currently the site is running without Cloudflare. But your hunch about ssl might be close to the solution, since now it’s not 502 anymore but ssl error. Here’s the error when opening the site with Cloudflare

error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure

I’m not sure what to check again, I tried changing the Cloudflare ssl/tls setting from no encryption, flexible, full, & full strict, all still show ssl error like above.

Thanks for the update. At the moment I see:

What are you seeing?

yes, that’s how the site should be. but I haven’t turned on Cloudflare.

but just now I tested it again & turning on Cloudflare. it’s… working normal? how is it at your end? now Cloudflare is turned on.