Site running very slow & receiving errors while in WordPress

wordpress

#1

For a while now, our site has been running slower & slower & at times is to the point where it will not load at all. We have been receiving a range of error messages when we are in our WordPress Dashboard from:

Internal server error
server not found
not found - you’re looking for something that is not here
also a message that comes up in red at the top of the ‘new post’ page that says ‘Connection lost. Saving has been disabled until you’re reconnected. We’re backing up this post in your browser, just in case.’

We upgraded to the latest version of WordPress (3.7.1) hoping it would improve our problems, we have tried many suggestions to improve things & it does seem better at times error wise but hasn’t removed them all together, all the time. It’s very strange because sometimes it works like a dream & other times it can take an eternity to get anything done. We mostly have these problems when we are using WordPress trying to draft posts etc but when things are really bad, the actual site itself is sluggish & at times won’t load & commenting on posts is impossible. Any help or suggestions anyone can offer we would so greatly appreciated :slight_smile:

Website address: http://www.robertpattinsonau.com


#2

Your site is running super fast on my end. I see you rebooted your VPS recently. Did that seem to help?
[hr]
By the way, I also noticed Pagespeed pummeling your site. I see it filling up your access log a LOT, so I would suggest disabling it in the panel, then test the same dashboard functions 5-10 minutes later. You can try to see if that works; Let me know if there’s any improvement!


#3

Thank you for your quick response, much appreciated. We do re-boot the VPS when we are experiencing slowness/errors & sometimes it does help & other times it doesn’t. When it does help it’s only short-lived sadly.

Thank you for the tip re: pagespeed, will give that a try & let you know.


#4

I have disabled pagespeed & done a couple of test posts & unfortunately no difference. When I hit ‘publish’ it looks like it is going to load & publish - sits there for a few minutes & then displays the ‘not found’ error & after that I am not even able to access the site. However, when it does allow me to access again (it took about 5 minutes), the post has appeared on the main page - very strange.


#5

So to state the obvious, if it’s ONLY happening on the backend, it’s probably a plugin being called from wp-admin only :slight_smile:

What does the not-found look like? Is it styled like your theme or is it a server generic one?

I DID notice your .htaccess wasn’t 100% correct. It should have this for the WP section at the end:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

But that shou;dn’t matter :confused:


#6

We have tried deactivating all our plugins but no luck. Is there any way to tell if a plugin is causing a problem or is it just a case of deactivating one by one to see if they are causing problems?

The ‘not found’ error is styled like our theme - it looks exactly like our site but instead of seeing the post, we see the ‘not found’ error.

Is there any reason why we wouldn’t have the WP section in our .htaccess. Could that have been deleted somehow?

Thank you :slight_smile:


#7

You can try using this plugin to see what plugins are using up your site’s memory: http://wordpress.org/plugins/p3-profiler/

Also pretty much any plugin could edit your .htaccess, or you may just have an older one that needs some updating. It’s not a major issue.

The other thing to look into is your database. It may need to be optimized (see http://wiki.dreamhost.com/Optimize_database for how to do that). If you have a lot of spam comments, they could be slowing down the DB calls.


#8

RPAU, you ever find out what the problem was? Right about the same time, I started noticing my website cracking like an egg on the sidewalk, too. Same symptoms, crappy load times, server errors, etc.

I’m just kind of at a loss.

The P3 plugin says that plug-in load time takes about 7 seconds, and half of that is Jetpack.

I’m seeing load times that are MUCH longer than that!

Any advice or troubleshooting ideas are welcome.


#9

EdwardMartinIII - Which domain? All of them?

The problem with debugging these things is that the whole picture is surprisingly complex.

Is it just you and a bad connection? Is it a plugin phoning home for content that’s taking a while? Is it the server needing a kick in the pants?

Generally what I do is grab something like gtmetrix.com to test how fast THEY think it is. Then I turn off all my plugins and test again. If it gets better, yay! a bad plugin. If not, then I’d check on my PHP settings. Am I on 5.3? Should I try 5.4? Does Google Pagespeed work or hurt?

It’s a lot of testing and trial and error :confused:


#10

“Which domain? All of them?”

Yep, all of them. As far as I can tell. But the one I REALLY care the most about is my business site.

Maybe I’m doing something wrong…

I notice a long delay in page loading. Let’s say, this page, which is both typical and popular:

http://www.hellbendermedia.com/Features_FOMF.html

So, first, I run the page through here:

Result load times (five tests): 18.85s, 20.36s, 25.86s, 13.35s, & 28.92s

Seems like the HUGE majority is the very first load result.

The second-most troubling bit is the custom CSS (which I understand WordPress recompiles for each page load, which I think is stupid, but I’ll roast that donkey later), but that looks like only about 1/6 of the load time as that first acknowledgement.

The seven slider images are 83.1kB, 54.7kB, 96.6kB, 57.4kB, 62.6kB, 56.3kB, & 61.6kb. Of the seven images, the longest load time was 43 uS. So – while I may be outta my league a bit – I don’t think they are the problem.

So, that was one test site.

At another test site:

http://www.webpagetest.org/

I ran the same page (Features_FOMF.html)

Result load times:

Test 1 First View: 28.634s
Test 1 Second View: 23.069s
Test 2 First View: 21.889s
Test 2 Second View: 28.571s
Test 3 First View: 21.330s
Test 3 Second View: 11.337s (well, isn’t THAT weird!)
Test 4 First View: 41.231s (ha-ha, fooled me twice!)
Test 4 Second View: 29.290s

When I examine the waterfall of these results, again, the very first line is doing all the I-Hate-Your-Users heavy lifting.

It SEEMS like the browser makes the request and then the server runs off to the bathroom for a minute before bothering to respond. Could that REALLY be just WordPress spinning up? Could it be some Random Joe who is also hosted on my server doing some random thing?


#11

So if you go to http://www.hellbendermedia.com/readme.html that loads fast (though it’s blank, which is weird and possibly due to your use of .html in your URLs - which is not recommended).

I ran some commands on your server to test WP and got an average of 10 seconds to get PHP to run a command like ‘list all WP plugins.’ I checked the load on the box and it’s where we expect it to be. I restarted Apache just to be sure which seemed to help a little (command line checks went down to 5 seconds) but the webpagetest results aren’t great.

What custom CSS are you running? Beyond the fact that WP doesn’t compile it (unless we’re talking SASS/Less there is no compiling of CSS), even plugins like Jetpack’s CSS don’t compile on every page load. Or rather they shouldn’t! Jetpack’s CSS editor stores the custom CSS in the database and then calls it per page load, but that’s to be expected since it has to put 'em somewhere. (FWIW Jetpack’s CSS and WP Super Cache play well with Google Pagespeed on our servers).

Funny story … bulletproof-security can slow your site down :confused: I wonder if that .htaccess is what’s slowing everything down, because it has to check ALL that before it can load.

I would turn it off for a test and change WP Super Cache to the .htaccess version if you haven’t already.