Wordpress Memory Usage & Website Outage Issues Resolved

For the past two days, our site remained inaccessible due to intermittent crash of the Apache and MySQL servers. I immediately wrote to MediaTemple support to know what’s going on with the server. They stated that this had to do with the amount of traffic, and the number of active connections to my site were high. This got me thinking as the crash occurred many times in the off-peak hours where the traffic per hour would be in few hundreds. When I explained this, MT support suggested that I tune up the Apache and MySQL servers. I did that and nothing improved.

Server Statistics in Plesk showed that there was probably a memory leak somewhere. The memory usage shot up from 8% (fresh restart) to less than 100% in a span of 30 minutes. Here is what I did in an attempt to solve the problem and failed:

  • Moved static images to a different server
  • Disabled some Wordpress Plugins in random fashion
  • Tuned up Apache & MySQL as per MT’s documentation.
  • Pruned hundreds of Comments to keep the DB size down.
  • Optimized the Database via phpMyAdmin
  • Reinstalled Wordpress
  • Upgraded to more powerful dv (Extreme) server
  • Backed up the database & reinstalled the dv completely
  • Setup a Cron to restart the server at specified intervals (as a workaround)

Without wasting further time, I hired an expert who specializes in PHP5 and Apache, who then narrowed down the problem to a Wordpress Plugin. To my surprise, it was the most popular WP Super Cache Plugin which caused all the problems. That’s true, and not an April Fool’s joke :)

I’ve been using this Plugin for over an year now without any problems. Perhaps the current version does not play well with my server. After disabling the Plugin, the memory usage came under control and the site was reachable. Further server optimizations were done by modifying the following files:

  • /etc/my.cnf
  • /etc/php.ini
  • /etc/httpd/conf/httpd.conf

They’ve also installed the APC module which caches the PHP queries. With these modifications, the site is running fine and utilizes the memory better.

If you experience similar problems with your Wordpress Blog, first thing to check is Plugins. Observe by disabling one Plugin at a time and watch the memory usage in Plesk or SSH.

Bookmark this Page!

BlinkList | del.icio.us | Digg it | Furl | reddit | Spurl | StumbleUpon |

Related Posts


Email SubscriptionPrefer an E-mail subscription?

Enter your email address:

Delivered by FeedBurner

Leave a Reply