var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
As soon as MYSQL is started, HTTPD slows to total halt in 2-4 mins...
I've been having issues with member hosted sites. Especially during peak traffic, their site becomes slow, eventually to total inaccessibility.
When I restart httpd, their sites go back to normal speed. But then slow down again within 2 minutes. So I pretty much have to restart httpd every 2-5 minutes to keep member sites from running.
But today I found the real cause.
As soon as I stopped MySQL, their sites immediately started working again, and never again slowed down, until I started MYSQL again.
There's no load or memory change while sites slow down or are fast. There's no change in anything at all infact.
All I know is MYSQL (I have v5 installed) is causing this to happen.
But I really can't see how httpd and mysql can be related, and how can MYSQL do this to entire apache.
Can anyone help me on this. What should I do to fix this?
When the slow down starts, trying using an application like MyTOP to see what is going on.
You can also just type in 'mysql' (SSH). Then enter 'show processlist;'. Do that several times and see if there is something persistent or many queries that are causing a problem. If you do see something repeating over and over, check what database it is and based on the commands try to figure out what it is doing. If lets say it is deleting hundreds of thousands of records and then inserting it back into the database, that could certainly slow down your server.
Also, run this when it starts to slow down:
That'll show you a list of http requests, and it should help you figure out what the problem-virtualhost/script is.
You may also need to optimize your mysql setting