Oops – no HTTP/2 today…

Note to Self: DON’T MAKE SERVER CHANGES WITHOUT WRITING DOWN WHAT YOU’RE CHANGING FIRST!!!!!

So … about 11 hours ago, I thought that I’d try to upgrade my web server to use HTTP/2.

It sounded like a great idea after reading this article from Yoast, so I spun up Easy Apache and found the mod_http2 option. It mentioned that I needed to switch from one MPM to another, but I didn’t really think much of it.

To make matters worse, I also used the same time to uncheck a few random Apache and PHP modules that I didn’t think I needed.

As soon as I restarted Apache, sites already started looking hosed. 

Some wouldn’t even render their CSS, others were missing random images. But I didn’t know enough about HTTP/2 yet to realize whether I had actually screwed something up or if I just needed to make some modifications to WordPress to get everything working correctly.

At one point I thought that maybe all I needed was this HTTP/2 Server Push plugin, as I started to understand that HTTP/2 handles requests a lot faster, so was it possible that the browser was just getting the CSS file and other images too late and didn’t know what to do with them?

No, not really.

I also dug deep into caching issues, which is always a mess because I run Varnish and some of my sites use W3 Total Cache, though it’s currently disabled on my multisite install due to weird config issues. I also cleared my own browser cache and tried other browsers, but no luck.

Eventually I started to dig into the whole some images loading but others weren’t thread, and even more peculiar – I run three WordPress installs on this server … two multisites and one standalone, and only my big multisite install had issues!

This got me thinking back to some of the permissions issues I’ve had with Apache and PHP while trying to get APC working (quick summary – APC is supposed to be wicked fast, but won’t run under the SuPHP handler, only DSO … which handles permissions for running Apache different than SuPHP). What was weird was that images I had uploaded recently were missing, but the older images were fine … and note that all of the files were still present on the file system itself.

I gradually conceded that I needed to give up on HTTP/2 for now and roll back to what I had before, though this was a giant pain because I’d run Easy Apache so many times that something got corrupted in the config and I ended up making the biggest changes using YUM via SSH.

I got moved back from mod_mpm_event and mod_http2 over to mod_mpm_prefork, though that didn’t seem to make a difference.

Then on a whim I reinstalled mod_ruid2 because of this helpful explanation – Run all httpd process under user’s access right.

AND BAM – MY SITES ALL STARTED RELOADING PERFECTLY AGAIN LIKE MAGIC!!!

Well, almost like magic. I still had a lot of plugins to reactivate and other troubleshooting steps that I’d taken to reverse, but now … as far as I can tell … my WordPress network is back to the way it was 11 hours ago before I decided to try and setup HTTP/2 “on a whim!”

Clearly I need to do a lot more research into it, and also probably spin up a test site or something, before I start monkeying with that hassle all over again. 😛

Leave a Comment

Your email address will not be published. Required fields are marked *