I mentioned in my post about my plans for the year that things had gone sideways on me for my website earlier in the day. I’ve got an intermittent gremlin hiding in my website somewhere. And finding the little b****** is like a game of whack-a-mole because it can be almost anywhere. Fair warning, this one is mostly for people who are interested in solving website problems aka the technical bunch.
For context, my blog (and just about every other site out there) is really made up of thirteen basic components:
- The hoster’s server hardware
- Hardware settings for the overall server;
- The hoster’s server software;
- Settings for the server space I’m using;
- The WordPress application software itself;
- The settings for the core WordPress application software;
- A theme for the website;
- Configurations for the theme;
- Multiple plugins for the back-end of the website;
- Configurations for the back-end plugins;
- Multiple plugins for the front-end of the website;
- Configurations for the front-end plugins; and,
- My posts, pages, media and comments aka the content.
Most of my time and energy is devoted to #13, the content.
Over the years, I have had as many as 45 front-end and back-end plugins running (#9, 11), adding features or tweaking the look and feel here and there. The theme itself (#7) has been relatively stable for almost ten years, I love the one I use, and I have the pro version that lets me tweak it in a hundred different ways. The first six elements are the infrastructure of the website, and I tend to leave them relatively stable, upgrading pieces when I need to, etc. General maintenance.
When I’ve had major meltdowns over the last ten years, it has been one of three things:
a. I didn’t like the distribution of content across the two websites;
b. Something changed in the server software that messed up my site; or,
c. There was a problem with the hardware.
At times that has been where the company’s systems were hacked, or some setting got changed in the system’s back-end where I can’t see it, and suddenly my site started running REALLY slow. I switched from two hosts because their support for #1-4 was inadequate. But I’ve had an ongoing gremlin of sorts for about five years, and I don’t know where exactly it lies.
When the gremlin appears, things start running slow
As I said, I used to run about 45-50 plugins. But the back-end of my website started running slowly, so I cut it back to about 35 and then 30. Each time, it felt like I was cutting off a limb. I had spent a fair amount of time on the choice and configuration of plugins (#9-12) and liked how everything worked except when it didn’t. I eliminated plugins where there were conflicts and used single bigger / better plugins that could replace several smaller plugins that didn’t play well with each other. A few tools? I just dropped them.
Now here’s the twist in the tale. I don’t care about the speed of the front-end too much. That speed affects a lot of rankings in search engines and is part and parcel of search engine optimization, but most people coming to my site are doing so simply for MY stuff, aka either friends or family or people wanting to know about HR for the government. I’m not going to suddenly go viral because my website ranks higher in a search engine; I’m too niche for that type of concern. My REAL concern is the speed of the back-end.
Here’s what happens for any editing process. I open up an edit window, and the post appears. Then, some of the “configurable settings” for THAT post start to appear — like a featured image, categories, tags, and a few other key pieces that I need to set. Each of those uses up a bit of memory to load on the server. The amount of memory I have available on the server (not storage space, but RAM, basically) is controlled back at the #1-4 stage. As the post loads, it uses up that memory. Those are the basics.
About five years ago, I could run 45 plugins with no problem. I could even edit 10-12 single posts at a time if I wanted to do so (and sometimes, when I was tweaking the format, that made life WAY easier). Then the site started to slow down on the back end, often because of the size of the security plugins. It shouldn’t really affect the BACK-END, but it does for some reason. I cut it to 30, and it was all good again. I’m down to about 25 now. But anything I cut now is really painful to remove. Yet about a week ago, it started to run really slow in the background again.
My post loads, no problem. But whereas the image, categories and tags load within 3-4s if I’m running 0 plugins, with about 15 plugins running, it is about 8-10s for the rest of the pieces/settings to load. Slow load is still manageable at that rate, as I can work on other pieces while those elements load. Except at 25-30 plugins? Some of the edit windows NEVER finish loading. I can sit and wait and wait and wait.
I loaded THIS post, copied over from a previous one and edited it, and I’ve been working on it for almost 20 minutes of writing time. My Featured Image has loaded, while the categories, tags, and reusable images have not. I’ve installed a cache, can save the file, reopen it, and some of the rest or maybe even all of it, will load because it’s cached. (I just tested it, 40s to get my Featured Image to load, a reusable block timed out, and nothing for categories and tags yet. Closing and reopening? Everything loaded in 5s). This is NOT a resource-intensive site; it should NOT take those first times to load, no matter what is running.
Hacking the diagnostic loop
When you try to resolve this type of problem, the first two pieces of advice are (a) changing to the default theme and (b) removing all plugins.
I’ve done that so often (out the wazoo!) that I can eliminate the theme as the cause. It doesn’t matter right now whether I have the default theme or my premium theme installed, it still takes the same amount of time to load on the back-end (I can get a small performance bump on the front-end). I spent a huge amount of time this week testing out some other popular lightweight themes to see if I could get a huge performance improvement and truly eliminate my theme as the cause. I tried approximately 25 different themes, with the same result across the board. If I get above 15-20 plugins, it slows down. Unfortunately, none of those themes works as well for me as my current model. And for what it’s worth, my PolyWogg site has almost the same config WITHOUT the same slowdowns. It happens from time to time, but like I said, it’s intermittent, and NOT as frequent on the PolyWogg site as this ThePolyBlog site.
Now, everyone on the ‘net who knows anything about WordPress will say, “A-ha! it’s a plugin problem!”. Except it’s not. I’ve done the scientific method of loading them one at a time. It makes no difference. And so those with more experience will say, “A-ha! it’s a plugin conflict problem!”.
In other words, it is not one plugin causing the slowdown, it is two of them interacting with each other that is causing the problem. If you are into math and you want to test two plugins, the purest form of those tests would be N plugins * N-1, divided by two. Sort of like scheduling a tournament of 30 plugins in a hockey tournament where they all have to play each other once, which would be 30 teams * 29 opponents divided by 2 teams in each game = 435 games. Yikes.
It’s a nightmare to do that, obviously. I can’t test 435 combinations of 30 plugins, or even 300, if there were only 25. So you can hack the combo pattern. Instead of testing Plugin 1 against Plugin 2, there are a series of variables you can make fixed. For example, of the plugins currently running, I can triage the list into “musts”, “needs”, and “likes”. I have 34 currently installed, but rarely all active.
MUST HAVE | HIGHLY WANT | NICE TO HAVE | |
FRONT-END | AddToAny Share Buttons Display Posts Display Posts – Date View Flexible Table Block Weaver Xtreme Plus Weaver Xtreme Theme Support | Photonic Gallery & Lightbox wpDiscuz Yet Another Related Posts Plugin | Simple Lightbox Stackable – Gutenberg Blocks |
BACK-END | Akismet Anti-Spam LiteSpeed Cache ManageWP – Worker Media Library Assistant OG — Better Share on Social Media Really Simple SSL WP to Buffer Pro Wordfence Security Yoast Duplicate Post | Advanced Editor Tools Health Check & Troubleshooting Nested Pages Redirection MailPoet MailPoet Premium WPForms Lite WP Mail SMTP | Dashboard Wordcount Simple Blog Stats Broken Link Checker Media Replace Press This WordPress Importer |
Obviously, I can install the MUST HAVEs, which are 15 plugins and test those. Since I have to have all of them for my current functionality, I might as well test with that WHOLE group running, minus the Caching program (not much of a test if the Cache is running). With those running, everything loads in about 9 seconds. Not bad, right? Not awesome, admittedly, but it loads fast ENOUGH that I can be working on other things while those are lazy loading, so to speak. So those 15 “work”.
Then, I can try adding them either in bundles (3-4 each time) and see if anything happens OR perhaps some of the “bigger” ones in the back-end first.
For Bundle 1, I focused on the WPForms, WP Mail and MailPoet as they all work together. As I added each one of them, the site got slower and slower but not immeasurably with each one. Some added a second or two, some added no increase. I continued with other bundles of three or four at a time, seeing what they did to my load time, and as I added more and more plugins, creeping up into the high teens and early 20s, the site started to hit what I consider my magic threshold. Anything above 21 right now was bogging it down. Hello gremlin, my old friend, you’ve come to annoy me again.
Technical support has entered the chat
Oh, I know what you’re thinking. Can’t you get tech support to help? But here’s the rub. Tech support is good for #1-4 (the server setup). Occasionally, they’ll help you diagnose something where it is a WordPress configuration issue (#6). But after that? The rest of that is YOUR website and YOUR problem. And since it is almost impossible to find WHY it would be doing this, particularly as it is intermittent, it would seem like a plugin or theme problem.
I’ve also come to suspect that the gremlin has friends, of sorts. Or perhaps grandchildren.
About four years ago, the problem turned out to be a security plugin that was doing something funky on my site. I think it was mis-interacting with other plugins, but it was going into an infinite loop. It had done that before on another hoster’s servers, and they couldn’t tell me what was going on, they claimed it was my site causing the slowdown but not how. That was the last straw with them, so I shifted to a new host. Everything was fine so I thought that was the proof that it was the previous host. Except then it happened on my new server. So much so that the host contacted me and asked, “WTF you running over there? It’s slowing down the WHOLE shared server!”.
But I got lucky…one of their Level 2 supports looked, quickly realized the security plugin had created an infinite loop of calls, and disabled it for me (with my permission). Everything went back to normal. I checked online and this was a known gremlin for that security plugin. One of the biggest and most popular ones would occasionally futz itself and mess up a config file. You can disable it, uninstall it and reinstall from scratch to fix it — or just use one of the other security plugins. I was running a huge overhead plugin called JetPack which divides the WordPress community in two — those who love it and developers who HATE it. It’s really intrusive. Well, the security plugin was conflicting with it, as was two other smaller plugins to a lesser extent, and I changed security plugins and eventually dumped JetPack anyway. Unfortunately, without JetPack, I have all this other mail stuff to run just so I can get email versions of my posts when I post and allows people to get my posts as newsletter feeds. Not that I have that many people doing that, most get it from Reddit, FaceBook or Twitter. Or referrals from friends.
Anyway. Where was I?
Oh yeah, killing gremlins. Another time it was a legacy of a hack. Another time it was a misbehaving plugin that has since been patched, but I don’t let it run all the time, just when I want some specific stats.
But, as I said earlier, the dang site was bogged down so I reached out to Tech Support earlier noting that I was overloading the Physical Resources AND my IO process limit. Did they see anything that was amiss?
Often I end up using Tech Support as a catalyst for brainstorming. Since they don’t know my site inside and out, I ask questions and they give me crappy answers at Level 1, I eventually get up to L2, and then their responses often trigger something in me.
This time, while I was chatting with them, I got the standard popup in my file manager asking me if I wanted to upgrade to the next level of website performance. I didn’t, it’s almost double the price. I talked to them about it about 8m ago when it started going slower for awhile, and I would love to do it for a month to see if it would make a difference, but alas, they don’t have a trial option to do that and I’m already on a really good discounted plan. If I give it up, it’s gone. I can return to my current lower setting, but at more money than I’m paying now. There’s no simple way to test it to see if it works. And honestly, the improvements will only help me in this area, if at all. There are lots of other “perks” to the higher package but are not anything I need or want or will ever use. Sigh.
So we go around and around, ask a few questions, when I notice something amiss.
My comparison of the three models of plans that are suitable to my situation show that they have three levels of resource availability. The first is 512M, the second is 1G, and the third is 2G. For I/O processes, 2MB, 4MB, and 8MB versions per second. I’m on the middle tier, so 1G and 4MB / second. Except, wait a minute…as I’m going through the allocation process for memory, the piece that is being overloaded right now, my internal server dashboard is showing me 512MB and 2MB/s. The lowest plan settings. I double-check, and then triple-check with a comparison to PolyWogg.ca. The other site? My main site for HR that works? It’s set properly. This one is not.
FFS, is that REALLY it? I ask, they go into conniptions and embarrassment and make the switch / upgrade overnight. Today, everything is loading in 10s.
I should be mad, right?
So, it looks like most of the problem has been a misconfigured server on their end. Instead of being on the higher plan, they’ve had me on the lower plan for some time. I’ll write to the billing people, just for sh**s and giggles, but honestly, I’m not sure I can be that mad at them.
First and foremost, the error has almost NO effect on my website for the user. It’s a wee bit slower than it should have been, but not noticeable as I don’t have that many viewers. I don’t pay for the higher tier for front-end performance, I pay for the backend.
Second, I know how it happened. Way back when they got hacked, they had to create what they called LifeBoat servers. They suffered a massive attack from a former employee, something very hard to defend against if not impossible (the person had access in the building to the servers!), and they could have been dead in the water. They managed to find a way to make things work again, and while frustrating, they created lifeboats to get us up and running as fast as possible. They have customers that are WAY more important than me, but they got me going pretty quickly, all things considered. And when it was “over”, they moved lifeboats back into the main hubs. Which I’m pretty sure is when I got downgraded to the lower-tier plan for space. It shouldn’t have happened, but it’s understandable how it did.
That’s hard to generate anger around…little front-end effect and an understandable reason. Plus, I’ve seen that information in my dashboard for some time. I just didn’t realize what it meant. As I said, I’ll ask for a retroactive credit of some sort, or they’ll extend my expiry date by a month or two or three, but I’m glad that part is fixed.
Oh, right. I left out the important part. There ARE two plugins messing up my load time on the back-end.
I already knew one before I started was a likely culprit. Stackable. It’s a plugin that lets you add a whole laundry list of really good extra style blocks. Back in the dark ages before the Pandemic, I tested a bunch of “block” plugins, and Stackable won by a country mile. I bought the lifetime premium membership option. But, well, it is designed to add things to the back-end editor. Of course, it slows things down. That’s what it does when it adds that functionality. I’ve reached out to them, and they’re working on a speed improvement, but for now, I just have to pare back what I use.
The second one was another likely suspect. I was pretty sure my Mail bundle was screwing things up. I have MailPoet that formats my email newsletters (emails of my posts), WP Mail SMTP that lets me send mail as an authorized sender less likely to be caught in spam filters, and a WP Forms plugin that lets me add a nice contact form to my site. Do I need all of them? Meh. It’s more professional to have them than not. And it means I don’t have to run JetPack. What I should do is find a simple integrated plugin that does all three in a lightweight fashion and pay for a lifetime subscription. But that’s a problem for another day. In the meantime, I put up with MailPoet, as it is the one that slows things down.
I’ve stripped the two suspects down to their skivvies, and the site is loading. Maybe that’s all I can ask for now. Other than my rebate from my hoster.
For now, it’s resolved, if not solved.