Long on load times

A wordpress site that I’m working on became slow all of a sudden, looking at the results its caused by the on load time. I’ve tried using cache plugins which helped out a bit but still not enough. I even used a plugin profiler which showed that plugins took up about 48% of the load time. The load time is consistently long with every test that I run.

Are there any other fixes for this?

By any chance did you notice that this slowdown started happening around the 24/25th of December? We had the same problem with several sites we host (in fact, whatever was going on, was even effecting other sites that didn’t use the WordPress engine).

We fixed it sometime this morning, I’m just waiting for my server guy to get back to me about what exactly he did to fix it. I would put money down that you may be seeing the same thing. (Although, I don’t have any money, so don’t count on it!) :wink:

Sounds like ultimately the problem was in some not-so-optimized settings for Fast CGI.

If you are able to edit config files on the server, maybe try this:

First… backup the /etc/httpd/conf.d/fcgid.conf file (In case this all goes south and blows up even more)

Then, you’ll want to edit the file. Here are (apparently) the lines in the config file that we had to change.

LoadModule fcgid_module modules/mod_fcgid.so

AddHandler fcgid-script fcg fcgi fpl

FcgidIPCDir /var/run/mod_fcgid/sock
FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm

FcgidInitialEnv RAILS_ENV production

FcgidIdleTimeout 3600
FcgidIdleScanInterval 480
FcgidBusyTimeout 1800
FcgidBusyScanInterval 480
FcgidZombieScanInterval 12
FcgidErrorScanInterval 12
FcgidProcessLifeTime 0

# Change the rate at which new FastCGI processes are spawned under load. Higher=faster
FcgidSpawnScoreUpLimit 10

# Higher number = spawning more FastCGI processes decreases the spawn rate (controls runaway
FcgidSpawnScore 1

# Higher number = terminating FastCGI processes decreases the spawn rate (controls runaway)
FcgidTerminationScore 2

# Increase the FastCGI max request length for large file uploads (needed for some sites)
FcgidMaxRequestLen 1073741824

FcgidMaxRequestsPerProcess 100000
#FcgidMinProcessesPerClass 3
FcgidMaxProcessesPerClass 4
FcgidMaxProcesses 16
FcgidIOTimeout 1800

Making those changes helped our sites decrease their first load times from around 72s to about 3-4. Now I need to nurse the remaining hairs I have left on my head and redo some of the work I undid while we were trying to figure out what was going on. :slight_smile:

Good luck!

Thanks for your reply, the slow down only started 2 days ago for me but was working fine before. I’m not using Fast CGI so I’m not sure if I can use that.

I went on phpMyadmin and went on my server status and it says “This MySQL server has been running for 2 days, 2 hours, 24 minutes and 36 seconds. It started up on Jan 08, 2017 at 09:11 AM.” This was around the time the site slowed down. Could this be the reason?

EDIT: I’ve finally fixed it. I was using w3 total cache at first which helped out a bit but didn’t help the page loading time very much. However I installed wp super cache and now my time to first byte takes under 700ms compared to before it was 5secs+ sometimes even 16. Website is now very snappy and even better than before everything went bad.