502 Errors

twest

New Member
#1
Hello everyone! I'm using the enterprise litespeed webserver, and Enhance control panel, PHP 8.1.

Yesterday I noticed on a colleagues server that some sites were returning 502 errors when going to the WordPress login at /login/. I tested on my servers and they also had this issue on most sites. I discovered that restarted PHP for a site fixed the issue. Also, when a site was affected by this issue, the regular login at /wp-login.php was still accessible/working.

Today there was a sites homepage returning a 502, which is much more concerning than /login/. It was fixed by restarting the php container.

Anyone seen this before? Things were running fine for a couple months, never had this issue, then all of a sudden yesterday it started on all servers.

Appreciate any ideas :)
 

serpent_driver

Well-Known Member
#2
A 502 error indicates that you are using a proxy. Can you confirm it?

**********************************************************************************************************************************************************************************
Join https://www.cachecrawler.com - Lightning fast Cache Warmup Crawler for Wordpress, OpenCart, PrestaShop, W3 Total Cache, WP Rocket, Shopware and Magento.

support-partner-label.png
 
Last edited:

twest

New Member
#3
A 502 error indicates that you are using a proxy. Can you confirm it?
Yes, Cloudflare. All sites on affected servers are on Cloudflare, but only around 75% of sites were affected by this issue. It was strange that restarting PHP in each sites container resolved the error, so I don't know if it's specifically Cloudflare related.

During troubleshooting I did try clearing CF cache, and tried running "dev mode" to see if anything changed, but it didn't. If I run into this issue again I would probably turn off the CF proxy to see if the urls load good without CF in the mix, but currently don't have an affected site I can test at the moment.

Hoping to gather more data from others that may have been affected. Also appreciate any theories or ideas, or if there's a specific setting in CF known to cause the issue? :)
 

serpent_driver

Well-Known Member
#4
If you use external services such as a CDN, the possibility of finding the cause of the LiteSpeed error is reduced. For logical reasons, I can only recommend that you temporarily deactivate CloudFlare and observe for a few days whether the error occurs even without CF. Otherwise it will be difficult to find out the cause.

Regardless of the problems described, you should think about whether you have any advantage at all from CloudFlare or a CDN. A CDN is not bad, but due to the lack of sufficient knowledge of most users, a CDN has more disadvantages than advantages. This is especially true if less than 50% of your site's visitors come from another country. The reason for this is that the local Internet provider's name server resolution is faster than any CDN. This means that if the majority of visitors come from your own country, then name server resolution will take longer if you use a CDN like CF, quic.cloud or any other CDN.

https://blog.litespeedtech.com/2021/07/26/cdns-with-kevin-fwu/

**********************************************************************************************************************************************************************************
Join https://www.cachecrawler.com - Lightning fast Cache Warmup Crawler for Wordpress, OpenCart, PrestaShop, W3 Total Cache, WP Rocket, Shopware and Magento.
 

Attachments

Last edited:

twest

New Member
#5
If you use external services such as a CDN, the possibility of finding the cause of the LiteSpeed error is reduced. For logical reasons, I can only recommend that you temporarily deactivate CloudFlare and observe for a few days whether the error occurs even without CF. Otherwise it will be difficult to find out the cause.

Regardless of the problems described, you should think about whether you have any advantage at all from CloudFlare or a CDN. A CDN is not bad, but due to the lack of sufficient knowledge of most users, a CDN has more disadvantages than advantages. This is especially true if less than 50% of your site's visitors come from another country. The reason for this is that the local Internet provider's name server resolution is faster than any CDN. This means that if the majority of visitors come from your own country, then name server resolution will take longer if you use a CDN like CF, quic.cloud or any other CDN.

https://blog.litespeedtech.com/2021/07/26/cdns-with-kevin-fwu/

**********************************************************************************************************************************************************************************
Join https://www.cachecrawler.com - Lightning fast Cache Warmup Crawler for Wordpress, OpenCart, PrestaShop, W3 Total Cache, WP Rocket, Shopware and Magento.

Thanks for the ideas. I'll definitely do some testing in Cloudflare config if this issue comes up again, hopefully be able to narrow down a specific setting that's an issue if possible.

Cloudflare is an integral part of our stack, all our sites use it. We use it not just for improved pagespeed, but also for security and DDOS protections. It also greatly lightens the load on our servers. Unfortunately, if it comes down to it we will have to switch to Apache webserver if there's no resolution between Cloudflare/Litespeed (if that's the issue), as Cloudflare is a higher priority product in our stack.

Hopefully doesn't come down to such a drastic solution though. I've been happy with litespeed performance and really want to keep it running. I've gotten some reports from other users on Enhance that they also are getting 502s on the nginx webserver, so it may also be an issue on Enhance side, the php integration somehow losing communication with the webservers.

For now just gonna keep monitoring and gathering more data from other users. Hope the problem either never comes back or maybe someone notices a specific conflict somewhere :)
 
Last edited:
#6
Hi, did you manage to resolve the problem ?
As best I can tell it may have been a temporary issue with my docker containers after the last major version update. Haven't run into the issue again after restarting all containers, but also haven't run updates either. If after running updates this issue pops up again I'm going to be real concerned.
 
Top