MySQL locking up

MySQL locking up

napisao/la Eric Kemsley -
Broj odgovora: 7

Everyday at about 2 PM, the mysql database locks up and I have to restart the mysqld service.

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,

Eric

U odgovoru na Eric Kemsley

Re: MySQL locking up

napisao/la Noveck Gowandan -

Maybe a cronjob or script is hanging.

Do you have statistics available? What time is it set to run?
[Admin->Server->Statistics]

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?

Cheers,

-n

U odgovoru na Noveck Gowandan

Re: MySQL locking up

napisao/la Eric Kemsley -

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?

# run-parts
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?

Thanks


U odgovoru na Eric Kemsley

Re: MySQL locking up

napisao/la Eric Kemsley -
I see that stats are to run at 1400, but have been failing to actually run.
U odgovoru na Eric Kemsley

Re: MySQL locking up

napisao/la Noveck Gowandan -

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?

Cheers,

-n

U odgovoru na Eric Kemsley

Re: MySQL locking up

napisao/la Robert Brenstein -
Running statistics at 2 pm is a bad idea in general. Running it at 2 am would be better. Unless that is your users are active at night server's time.
U odgovoru na Robert Brenstein

Re: MySQL locking up

napisao/la Eric Kemsley -

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.

U odgovoru na Eric Kemsley

Re: MySQL locking up

napisao/la Denpong Soodphakdee -
Hi..

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...

denpong