Looks like my fix yesterday did take care of the problem. I'm still keeping my eye on it, but so far so good. One big help in tracking this down was enabling the MySQL slow query log. This lets you set a threshold for number of seconds, and then any query taking longer than that gets logged to a specific file. Watching that file is then a huge help in spotting where potential problems are hiding.

Here's the official MySQL slow query log page, and here's a nice write up on how to activate it. Basically it just amounts to adding these lines to the my.cnf file and restarting MySQL:
long_query_time = 1
log-slow-queries = /var/log/mysql/mysql-slow.log
I had to create the /var/log/mysql/ directory (and chown mysql:mysql) in order to get it to work.
- jim 3-08-2007 5:34 pm




add a comment to this page:

Your post will be captioned "posted by anonymous,"
or you may enter a guest username below:


Line breaks work. HTML tags will be stripped.