Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Aug 07, 2012 11:06 pm 
Offline
Newbie

Joined: Tue Aug 07, 2012 11:00 pm
Posts: 4
I have been running a Wordpress blog for more than a year and a half now with no issues. Today I tried to install a second Wordpress blog, but ran into a number of issues.

The second blog installs okay and seems to be running, but as soon as I start loading plugins and themes, my entire linode 512 starts lagging. I eventually get to a point where the first blog is running fine, but as soon as I make a request for the second blog, MySQL crashes. Like literally typing in the URL to the second blog will cause MySQL to lock up to point where both blogs get the "database connection error".

I restart Apache and MySQL and the first blog is accessible again, but anytime I try to request/load the second site everything goes to crap.

I am pretty new to this, but I am stumped. Any help would be much appreciated.


Top
   
PostPosted: Tue Aug 07, 2012 11:09 pm 
Offline
Newbie

Joined: Tue Aug 07, 2012 11:00 pm
Posts: 4
I assume its MySQL because I get the "database connection error" from WP. I am not sure if an Apache issue would cause that.

Also these are my processes listed by memory usage. Should I have this many Apache2 processes?

%MEM %CPU RSS VSZ COMMAND
8.6 3.1 43824 319492 /usr/sbin/mysqld
4.3 0.1 22188 57916 /usr/sbin/apache2 -k start
3.1 0.0 15880 51592 /usr/sbin/apache2 -k start
3.0 0.0 15724 51592 /usr/sbin/apache2 -k start
3.0 0.0 15524 51588 /usr/sbin/apache2 -k start
2.9 0.0 15180 51592 /usr/sbin/apache2 -k start
2.6 0.1 13496 49452 /usr/sbin/apache2 -k start
2.6 0.1 13360 49444 /usr/sbin/apache2 -k start
2.6 0.1 13240 49444 /usr/sbin/apache2 -k start
2.6 0.0 13412 49444 /usr/sbin/apache2 -k start
1.3 0.0 6884 43760 /usr/sbin/apache2 -k start
0.2 0.0 1300 41256 /usr/sbin/apache2 -k start
0.2 0.0 1300 41256 /usr/sbin/apache2 -k start
0.2 0.0 1300 41256 /usr/sbin/apache2 -k start
0.2 0.0 1216 3492 /sbin/init
0.2 0.0 1184 6864 -bash


Top
   
PostPosted: Tue Aug 07, 2012 11:10 pm 
Offline
Junior Member

Joined: Fri May 27, 2011 5:01 pm
Posts: 20
Apache is a process based web server, so yes seeing quite a bit might be common.


Top
   
PostPosted: Tue Aug 07, 2012 11:29 pm 
Offline
Newbie

Joined: Tue Aug 07, 2012 11:00 pm
Posts: 4
Digging into it a bit more(post crash) I found that the number of apache2 processes more than doubles, and sqld drops down to .8% usage. This is after requesting the second site.

%MEM %CPU RSS VSZ COMMAND
4.0 3.2 20848 56360 /usr/sbin/apache2 -k start
4.0 3.2 20848 56360 /usr/sbin/apache2 -k start
4.0 3.2 20848 56360 /usr/sbin/apache2 -k start
4.0 3.2 20848 56360 /usr/sbin/apache2 -k start
4.0 3.1 20848 56360 /usr/sbin/apache2 -k start
4.0 3.0 20848 56360 /usr/sbin/apache2 -k start
4.0 3.0 20820 56360 /usr/sbin/apache2 -k start
4.0 2.8 20796 56360 /usr/sbin/apache2 -k start
4.0 2.7 20848 56360 /usr/sbin/apache2 -k start
4.0 2.7 20844 56360 /usr/sbin/apache2 -k start
4.0 2.6 20836 56360 /usr/sbin/apache2 -k start
4.0 2.6 20716 56360 /usr/sbin/apache2 -k start
4.0 2.5 20840 56360 /usr/sbin/apache2 -k start
4.0 2.5 20836 56360 /usr/sbin/apache2 -k start
4.0 2.4 20836 56360 /usr/sbin/apache2 -k start
4.0 2.4 20836 56360 /usr/sbin/apache2 -k start
4.0 2.4 20836 56360 /usr/sbin/apache2 -k start
4.0 2.3 20836 56360 /usr/sbin/apache2 -k start
4.0 2.3 20832 56360 /usr/sbin/apache2 -k start
4.0 2.2 20836 56360 /usr/sbin/apache2 -k start
4.0 2.2 20832 56360 /usr/sbin/apache2 -k start
4.0 2.1 20836 56360 /usr/sbin/apache2 -k start
4.0 2.1 20836 56360 /usr/sbin/apache2 -k start
4.0 1.9 20836 56360 /usr/sbin/apache2 -k start
4.0 1.8 20808 56360 /usr/sbin/apache2 -k start
4.0 1.8 20732 56360 /usr/sbin/apache2 -k start
3.5 1.9 18252 56360 /usr/sbin/apache2 -k start
3.1 2.0 16188 53288 /usr/sbin/apache2 -k start
1.8 4.0 9584 56460 /usr/sbin/apache2 -k start
0.9 1.5 4924 56360 /usr/sbin/apache2 -k start
0.9 1.1 4916 56360 /usr/sbin/apache2 -k start
0.9 1.0 4916 56264 /usr/sbin/apache2 -k start
0.9 0.8 4916 56360 /usr/sbin/apache2 -k start
0.9 0.8 4916 56360 /usr/sbin/apache2 -k start
0.9 0.8 4916 56360 /usr/sbin/apache2 -k start
0.8 2.1 4508 331296 /usr/sbin/mysqld
0.7 0.3 3736 41232 /usr/sbin/apache2 -k start
0.3 0.0 1700 41256 /usr/sbin/apache2 -k start
0.3 0.0 1700 41256 /usr/sbin/apache2 -k start
0.3 0.0 1700 41256 /usr/sbin/apache2 -k start
0.3 0.0 1700 41256 /usr/sbin/apache2 -k start
0.3 0.0 1700 41256 /usr/sbin/apache2 -k start
0.3 0.0 1700 41256 /usr/sbin/apache2 -k start
0.3 0.0 1700 41256 /usr/sbin/apache2 -k start

Couple seconds later I get "Error establishing a database connection" on both sites.

What could I have done to make everything crash after loading that one site? I've done this twice now, and I get the same result both times.


Top
   
PostPosted: Tue Aug 07, 2012 11:34 pm 
Offline
Sysop

Joined: Sat Nov 27, 2010 3:32 am
Posts: 180
Website: https://blog.timheckman.net/
Location: San Francisco, CA
Have you checked your Lish console to see if you are exhausting all free RAM (thus killing off MySQL?):

- http://library.linode.com/linode-manager/using-lish-the-linode-shell

You'll need to keep an eye on the Lish console when experiencing issues.

-Tim

_________________
'If debugging is the process of removing bugs, then programming must be the process of putting them in.' //Edsger Dijkstra
'Nothing is withheld from us which we have conceived to do.' | 'Do things that have never been done.' //Russell Kirsch


Top
   
PostPosted: Tue Aug 07, 2012 11:55 pm 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
Search for MaxClients in the forum; most likely, your Linode is running out of memory and the Apache configuration needs to be modified.


Top
   
PostPosted: Wed Aug 08, 2012 10:44 am 
Offline
Newbie

Joined: Tue Aug 07, 2012 11:00 pm
Posts: 4
Lish and MaxClients turned up useful information, thank you!

Currently working on optimizing both MySQL and Apche2.

Quick question, in the apache2.conf do I edit the parameters in all three modules(prefork, worker and event)?


Top
   
PostPosted: Wed Aug 08, 2012 10:50 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Just prefork the others only apply if you use a different MPM.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group