Websites have become extremely slow. All websites on my server are not responding to any HTTP/S requests (or respond after a 1 minute delay)

So this issue just began an hour ago, when I was investigating this and writing the post about it Files from my domain are being served with various "X-Powered-By" headers

A new problem has come up, but now this is happening on all the websites hosted on this server. For many of the js/css/image files, no headers for the requests are being sent at all for at least ~50 seconds. The only time any of the websites will load quickly is if the browser has already cached the files (ie a previous visit). If I open the developer console (in any browser) and disable browser caching, the majority of requests (instead of being Status: 200) will remain pending for almost a minute, or they will return a status of FAILED.

Iā€™ve tried different browsers on my 2nd computer, first entirely clearing the browser caches then visiting the websites, and the same thing happens. It will take a minute to load, many of the requests remain pending (or fail) but if it does end up loading, then each subsequent visit will be very fast (unless you open your developer console and disable browser caching then refresh the page. Again this is happening on pretty much every browser across multiple computers.)

So my page load times on my websites have gone from ~2s to almost 1 minute. I donā€™t have any plugins installed besides WooCommerce and a basic theme. Everything is up to date. At first I thought this issue was only happening to the 1 domain that I linked above (where I was getting served with different ā€œPowered-Byā€ headers, but then I tested as I was writing this and I realised it is happening to all 5 domains on my server. This is totally new, I browse these sites every day and Iā€™d never noticed the issue before. I have not made any changes to the server at all or to any of the sites since theyā€™ve gone online, the only thing is I always update EE to the latest version, and Iā€™ve been on 4.0.9 since it was released.

Below is pics of the page load time of 1 of the sites when your browser happens to have all the files already cached (ie if you happen to be a previous visitor and your browser has cached all the files from your last visit):

If you are a new visitor, or if you happen to open your dev console and disable browser caching then refresh the page, these are the results youā€™ll get:

The files that are taking the longest for the requests to be sent are always random. Across all of the websites Iā€™ve refreshed several times to see if there are any files in particular that are causing it to stall, but there is nothing consistent about it. It can be a css or js file from the WP core itself, to a file from WooCommerce, to a file from the installed theme. Iā€™ve power cycled the server, disabled/re-enabled all sites, cleaned caches on all sites.

Also as Iā€™ve mentioned, no changes have been made to the config on the server recently, although I did change php execution time but that was months ago, and even then Iā€™ve only changed the execution time for 1 of my sites, the rest have no custom PHP config. And none of the sites have any custom nginx, redis or memcached config. Everything is all basically default.

Speaking of the server, here is how the performance is looking if I am refreshing across multiple browsers & computers & using online load testing tools at the same time. So I donā€™t think server performance is the issue here.

Did you check to see if itā€™s a code issue? My sites are all running fine with WordPress, no cache, not even plugin cache.

Yes. Like I said though Iā€™ve been running these sites for months with no code changes (either server side or web side) made ever since theyā€™ve gone online.

I should I also mention I have tried multiple internet connections. I have 1 fiber optic connection, 2 ADSL2+ connections, all with different providers. Same issue persists across all computers/browsers/ISPs (although 1 ISP takes a slightly different route to the server, but thatā€™s just a fun fact)

Iā€™ve noticed similar behaviour a handful of times with the sites on my EE server too. Visit a site only for it to show ā€˜Waiting for example.comā€¦ā€™ for so long that I think my serverā€™s experiencing an issue, only to check another site on the same server and find it loads normally. Itā€™s not happening consistently though, but itā€™s happened enough to concern me. Itā€™s somewhat of a relief to discover itā€™s not only me experiencing the issue.

1 Like

Have you noticed it happening again lately? I donā€™t know if itā€™s coincidence but it seems to be when I am editing a site, I save a page update every minute and refresh to see what it looks like, then make more changes to the design etc. Maybe something is limiting my access ā€” but that wouldnā€™t really make sense for some of the requests being served fine and some stalling for a minute. And itā€™s not like ee has ufw in place. Iā€™m on a dedicated server, I tried a fresh install too and the issue did come back at some point. Itā€™s very odd but good to know itā€™s not just me going crazy.

For now I have started using the staging feature on blogvault, I subscribed to them for real time backups for e-commerce specifically but I didnā€™t know they had a staging feature included in the plan. Iā€™m doing that just in case it is the server blocking me somehow. But I doubt this is the case. Iā€™ve even contacted the data centre to confirm and thereā€™s nothing on their end blocking or rate limiting me from their end, plus when this is happening I will usually grab an LTE connection and try some of my domains on mobile, for the most part will load quickly. Not 2 second quick as I would usually expect. But at least under 10s.

On my 3 hard wired internet connections, I get the issue. And across multiple computers. And browsers. Very strange indeed.

Yes, similar issue - pretty sure Iā€™ve been logged into WordPress to make changes to content and design every time it has happened. Was updating a site - https://shafferoffshoresolutions.com - last night and twice I went to check the updates in a tab while logged in and the site hung at ā€˜Waiting forā€¦ā€™, but when I then clicked on a link in the main menu it loaded immediately. It has happened again once so far this afternoon. Itā€™s an odd and frustrating issue.

Edit: Sites are on a 4GB Hetzner Cloud server - never had an issue with them before EE4. Wondering if Dockerā€™s involved somewhere (EE4 is my first experience with Docker).

Damn what an annoying problem.

I have also been logged in to WP to make changes to content and design every time this has happened!

I canā€™t even save files via WP dashboard any more. Like if I want to edit my stylesheet or header.php or whatever via the dashboard, it will just stall when I click save. Iā€™m not sure if the two issues here are related but I am guessing they probably are.

I really like ee / canā€™t be bothered moving over to wordops so Iā€™m gonna stick this one out until I figure out what the problem is. The network hanging issue has only happened once again since I made this thread, hopefully it will remain that way. But it is weird that now I need to SSH/SCP in to make changes to files all of a sudden. I mean this is across all of my domains, not just 1 in particular. And I used to edit files manually via WP dashboard all the time and out of no where now it stalls (either Err_network_reset) or itā€™ll just say waiting for ā€¦ forever. Actually can you check on your domains if you can save changes via theme/plugin editor in WP dashboard? Just add a comment somewhere, no need to make actual code changes. I wonder if we could have the same problem or if mine is completely unrelated? Since you mentioned docker I am curious to see

Edit: I was curious to test out the site you linked, see it loaded fine for me at 2.44 seconds ā€“ your 4GB server is definitely more than enough for EE4, I donā€™t think thatā€™s the issue here. Iā€™ve got 5 woocommerce sites and 2 general sites running on my server all with their own db and redis containers, and Iā€™m barely hitting 1.5GB ram used (out of 16), and my memory settings for each site are not on default (heavily increased PHP ram allowance, redis too, but theyā€™re barely used anyway. My point being, I think your 4GB server is way more than enough.)

I seem to have fixed whatever was causing the slowness on my EE4 server with a reboot. I donā€™t like rebooting servers containing live websites unless absolutely necessary, but on this occasion the issue was driving me nuts. Since the reboot everything appears to be normal again, no random slowness in the last several hours and server load is down a lot too. I did notice that during the ā€˜hangsā€™ one or two php-fpm processes were maxing CPU out at 100% and then one or two php process would start and do likewise. My guess is that an EE update caused an issue somewhere down the line - Iā€™ve gone from 4.0.1 to 4.0.9 via all point releases without a single server reboot.

I did try editing a theme file via the WordPress admin (usually I use the wp-config.php constant to disable it because of the security implications) and it worked fine both before and after the reboot which, given the CPU/server load I was seeing, suggests the issues are unrelated.

My 4GB server has 15 sites on it! 10 low traffic WordPress sites, a dev Grav site, my own WPackagist fork, a HTML/CDN serving podcast mp3s plus a couple other projects, and it tops out at about 1.8GB of RAM usage. Itā€™s amazing what you can squeeze out of cloud servers these days.

Hope you get to the bottom of whatā€™s causing your server issue. Iā€™ll let you know if mine returnā€¦

1 Like

Sometimes a reboot fixes most of my problems ĀÆ_(惄)_/ĀÆ

Which command do you use to restart on ee4? reboot?

Just a quick update to say that the performance issues returned yesterday - same symptoms, random ā€˜hangsā€™, slow wp-admin, higher CPU use and server load etc. Another server reboot fixed it. The only change between the two periods of instability was the 4.0.9 to 4.0.10 update. Thatā€™s the only pattern Iā€™ve noticed so far. Iā€™m considering moving away from EE4 because of this issueā€¦ :slightly_frowning_face:

Happened to me yesterday again as well. Lasted about an hour. Iā€™ve already been on 4.0.10 though. Iā€™m going to try increasing the amount of PHP workers per site, see if that helps. If that doesnā€™t work I will create each site with its own cache and db containers; seems tedious but luckily I can 1 click restore each of those sites after I re-create themā€¦but still, last resort.

You know whatā€™s strange, given the slow down occurs across all of my computers/phones at the same time ā€“ yesterday when it happened I randomly thought to connect to a VPN (in my own country) and I browsed to all of the sites and they were all performing normally. I disconnected, and the hanging comes back (again, across all devices and browsers. Connecting via VPN on multiple devices = sites performing normally. Once disconnected, even on my phones, the hangs are back.) I donā€™t know if thatā€™s just a weird coincidence or what. But if you have a VPN subscription, or if you can boot up a small server and install a OpenVPN on it (check out Streisand on github, super simple to install) ā€“ next time it happens to you can you connect via VPN and see if you can access your server normally?

I think it was just a strange coincidence. Because Iā€™m with multiple ISPs anyway and these hangs happen across all of themā€¦although all of my connections use a static IP ā€“ and these slow downs tend to happen when I am putting a lot of my own activity on the sites (very frequent page edits etc)ā€¦could the server be rate limiting requests from our IP? I will have to go through all the nginx config files to see if thereā€™s anything set to do that.