Tips and Tricks HQ Support Portal › Forums › WP eMember › HTTP 502 Errors
Tagged: HTTP 502 Errors
- This topic has 7 replies, 3 voices, and was last updated 3 years, 5 months ago by algis100.
-
AuthorPosts
-
June 17, 2021 at 1:14 am #83177algis100Spectator
Hi. My members and I have been experiencing HTTP 502 errors intermittently but frequently on my website for a couple of weeks. I’ve been in discussion with both the hosting, security and WordPress teams of my hosting provider but they have all drawn a blank so far.
The errors are mainly happening on pages that are secured for members only via WP eMember and are happening far more often for people using Apple devices and laptops.
I recently had to upgrade my hosting plan for more resources, which meant moving to a new server, and they started happening pretty soon after that, although my hosting company have told me they have checked everything they can and it all looks OK from a hosting point of view.
Would there be any specific server config settings related to WP eMember that could be checked?
I’m running WordPress 5.7.2 and WP eMember v10.3.5 (also WooCommerce 5.4.1, in case that’s a factor) on PHP 7.4
June 17, 2021 at 2:23 pm #83184wzpModeratorMy members and I have been experiencing HTTP 502 errors intermittently but frequently on my website for a couple of weeks.
I recently had to upgrade my hosting plan for more resources, which meant moving to a new server, and they started happening pretty soon after that
A 502 Bad Gateway Error means that the web server you’ve connected to is acting as a proxy for relaying information from another server, but it has gotten a bad response from that other server.
This is not a plugin error, but a server configuration error. Are you using any server-side page caching or CDN services?
The errors are mainly happening on pages that are secured for members only via WP eMember and are happening far more often for people using Apple devices and laptops.
It is possibly an issue where your WordPress instance on the new server is having problems communicating with the MySQL database, because it is on the old server (or something like that).
June 18, 2021 at 1:32 am #83192algis100SpectatorThank you for your comments. I have fed them back to my hosting provider. Whilst having a look at the web server error logs this morning I did notice something new that is related to WP eMember that I haven’t see before…
[Thu Jun 17 00:35:37.751493 2021] [lsapi:warn] [pid 649531:tid 47704600336128] [client 185.93.228.4:57259] [host doneundone.com] Backend log: PHP Warning: Use of undefined constant EMEMBER_LOGGED_IN_AS – assumed ‘EMEMBER_LOGGED_IN_AS’ (this will throw an Error in a future version of PHP) in /home/kgasperas/public_html/doneundone.com/wp-content/plugins/wp-eMember/lib/class.emember_auth.php on line 351\n, referer: https://doneundone.com/wp-admin/plugins.php
Any ideas why that occurred?
June 18, 2021 at 4:33 pm #83201wzpModeratorWhat version of PHP is your server running, compared to the old server? And are you using the latest version of eMember? As the message states… it is only a warning; not a fatal error (for now).
June 20, 2021 at 7:36 pm #83206adminKeymasterThat warning is most likely being generated due to the other error that you are seeing on this site. One error can prevent the plugin’s normal loading of files (the include files). That will subsequently trigger another warning.
So make sure to fix the main issue first then reset your error log file and monitor it to see if any new error or warning gets added to the log file.
June 21, 2021 at 6:51 am #83210algis100SpectatorHi – both the new and the old server are running PHP 7.4. I was thinking of updating this to 8.0, as this is now the latest version, but will need to try and resolve the 502 errors first.
Am in the laborious process of deactivating all my plugins on a staging copy of my site and then reactivating them one-by-one to see which ones are potentially causing the 502s. Bizarrely I have already come across two, but neither is WP eMember. One is my SEO plugin, which is very widely used, and the other is MonsterInsights for Google Analytics!?! Not sure why suddenly these plugins are causing these issues but at least something to give my hosting company to go on.
BTW – I’m running WordPress 5.7.2 and WP eMember v10.3.5 (also WooCommerce 5.4.1, in case that’s a factor, as WooCommerce sometimes tends to mess things up too)June 21, 2021 at 6:47 pm #83219adminKeymasterAre you using the Yoast SEO plugin? That one shouldn’t cause any issue (I use that one myself).
June 22, 2021 at 12:57 am #83226algis100SpectatorHi – no, I am (or rather, was) using All In One SEO. Will move over to Yoast when I’ve finally figured out a resolution. Thanks.
-
AuthorPosts
- You must be logged in to reply to this topic.