Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I was using Cherokee as my default webserver and everything was working properly. I have an application that, when a user opens the application, it sends a request to my site, and my site returns something. The site uses MySQL to get the value it needs to return. Sometimes the application doesn't get the value it needs correctly and so it sends another request to the site until it gets the required value. I changed to Apache some days ago (I was getting too many 500-error with Cherokee), and now, if too many users open the application at the same time (I'm talking about... 5?) MySQL seems to stop responding, the application keeps sending requests and there are tons of mysql processes, so the site stops responding. I checked top and it is like: 100 processes: 100% CPU usage. Then, 3 seconds later, all those processes disappear. And 3 seconds later, again, tons of processes and 100% CPU usage.

What can I do? I think it is something related to Apache, but I'm not sure. I've searched through many sites, but found nothing. My file my.cnf is kinda small compared to others I've seen.

[root@s1 etc]#vi my.cnf

[mysqld]

datadir=/var/lib/mysql

socket=/var/lib/mysql/mysql.sock

user=mysql

bind-address=(MY SERVER IP)

old_passwords=1

[mysqld_safe]

log-error=/var/log/mysqld.log

pid-file=/var/run/mysqld/mysqld.pid

Thanks in advanced

share|improve this question
    
More detail is needed to provide any meaningful help. In particular a copy of the output from top would be useful. –  uesp May 24 '11 at 15:58
    
please send an output from ps -ef; vmstat 1 10; –  silviud May 24 '11 at 17:56
    
Ok, I will when it happens again –  Ivan May 24 '11 at 20:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.