Little off-topic for theITbaby, but something we ran into and fixed and I figured I’d share. As of last week with no changes to any hardware, software, or ISP the back end of theITbaby (WordPress admin,) started taking 30+ seconds to go from page to page.
The site itself was running fine, but if I was attempting to save a draft in the event of a toddler attack, it would sit there and appear to lock up for 30 seconds or so and then finally load the next page.
Although a few plugins had updated in that time, disabling them didn’t fix anything, so I went looking at Statpress which had a table of 300K entries. Deleting those, dropping the table, killing the plugin, no performance gain at all.
As the machine’s virtual I monitored the host machine for any chances in disk or CPU usage when I went from page to page and there it was – the CPU and disk usage dropped to next to no use for the 30 seconds that it was just sitting there.
No attempts were made on the disk, no attempts were made on the CPU, it was just taking a break.
When you’ve got a system not doing anything but sitting there, the obvious question is why is it sitting there not doing anything? What is it waiting for?
I decided to update the Ubuntu core and hope that with an update it would start functioning normally again so I did that standard:
sudo apt-get update
And found my culprit.
Rather than downloading the updates I got a notice it was attempting to connect to an ipv6 address. This was the lead I needed as we don’t have ipv6 ability where the server is hosted. I mean, we do, but it’s not set up and there’s no current route into the ipv6 lane.
Each time I went from page to page on the admin console something was attempting to connect via ipv6 to something, and spending the 30+ seconds timing out and falling back to ipv4.
I disabled ipv6 as per the instructions in this article, and the page transitions on the admin site went from 30+ seconds a piece down to about half a second (and that’s due to the way it’s routing in-network to get to me.)
In case the page linked up there is down, here’s the command set I used:
sudo pico /etc/sysctl.conf
page down until you’re at the end, add the following lines
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Save the file, that should be it. No reboots required or anything.
I have no idea what changed either in the network or in the config to make ipv6 suddenly rear its ugly head and be an issue, but this fixed me, at least until I make the transition to ipv6 for the site.