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
topwould be useful. – uesp May 24 '11 at 15:58