I have no idea where to begin trouble shooting this issue.
There is nothing telling in /var/log/mysqld.log
Moodle 1.9.5 on a Linux server
mysql Ver 14.12 Distrib 5.0.77, for redhat-linux-gnu (i686) using readline 5.1
TIA for any help,
Maybe a cronjob or script is hanging.
Do you have statistics available? What time is it set to run?
Do you have any jobs scheduled on the Server itself?
Look @ /etc/crontab
Run a mysqlcheck on the database, repair the tables and optimize.
Check your mdl_log to see if it is too large as well.
Do you have any backups running that can lock the databasetables?
I do have a cron job of backing up the database every hour.
Stats seem to be not running and it is turned on, could that be an issue?
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
mysqlcheck showed all tables to be OK for the moodle db
optimize showed ok and table is already up to date. It did some time for the moodle.mdl_log to finish. How do I find out the size of that log?
how is your database backed up, is it via cron?
i do not see it in the /etc/crontab listing.
what about posting a screenshot of the "top" command when the system becomes unresponsive?
Thank you for the relpies!
The database is backed up via a cron crob I setup in webmin.
The hardware is 600 GB HD space with 16 GB of RAM and 2 duel quad processers.
Very good point about the time of day to run the stats.
After turning them off, it did not lock up.
This ring my bell.. I ran into this problem before. I am pretty confident that it is causing by statistic. Your statistic may not been run for sometime so it take time to process and it is hardly catching up to date.
I did overcome the problem by turning off statistic (even I didn't want to) and upgrade hardware. The statistic process is an resource extensive process and can lock up other normal query to process, then the server appear down.
You may have to considering upgrade hardware, tuning database, considering InnoDB engine instead of MyISAM... etc...