mysql + cpu + page doesn't work

klemens

Verified User
Joined
Aug 15, 2007
Messages
22
Hello,

i have search the forum but didn't get any answer for my problem..

i have freebsd + directadmin
server is 2x quad core 4 GB memory

the problem is that mysql uses 99.99% cpu and mysql service is working but pages doesn't show up, i need to kill -9 the mysql and than start it.

I have check all the logs etc but didn't find any solution.

Maybe there is some query or something on my hosted sites that is doing this mess... but can somebody tell me how can i get this info?

And if somebody can tell me how can i make that if mysql uses more than 80 90% cpu that it will automatically restart or some cron or something, because mysql crashes 5 - 10x a day.

tnx for the info!
 
Have you tried to figure out why MySQL is hogging resources like this? You can find out quite a lot of information such as number of forked processes mysql is running and which databases are the worst offenders using phpmyadmin (click 'processes' tab) or mytop. Forcing mysql to use less memory is achievable but a last resort in my opinion, although you can quite easily limit a particular database's usable resources such as max queries per hour using phpmyadmin.
 
aha, tnx for the info.

i have enable log slow queries and i found some really messy query. When we have fixed that query everything was ok.
 
Back
Top