Problem with 100% CPU utilization

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hello and thanks for reading this message.
I have a Virtual Learning Environment (VLE) called "moodle 1.5.2" running on
a server with 1Gb of RAM and MySQL version 4.1.13-1 which has been
performing fine for a couple of months. The OS is a modern Linux distro
called Crux.

Recently the VLE has started to be used heavily and I am now finding that
after a short time the mysqld grabs 100% of the CPU time until the daemon is

When MySQL grinds to a halt I see the following query stuck in phpmyadmin:-

Copying to tmp table | SELECT DISTINCT, FROM mdl_user as u,

The moodle database user does have "CREATE TEMPORARY TABLE" permissions.

I sometimes see some other tables that are "Locked" because of the above
problem I think.

The problem seemed to occur about 10 hours after I removed sendmail from the
system and replaced it with exim but surely this couldn't cause the problem
with the MySQL could it ?

In fact I removed exim and temporarily reinstalled sendmail just to be sure
but the problem still existed so I think it was just bad luck that the
sendmail -> exim change coincided with the MySQL/Moodle problem.

At this moment in time I am relating the problem to the fact that the VLE
has just started to be used heavily rather than anything else.

 The only databases hosted by this MySQL are the one for the VLE and of
course the MySQL system itself.

I am really at a loss as to the best way to diagnose this problem. How can I
tell if it is moodle generating a query that MySQL doesn't like or if its
MySQL unable to complete some operation for whatever reason.

I'll obviously be more than happy to supply more information if required.

Thanks in advance for any help you can offer.


England UK

Re: Problem with 100% CPU utilization

Quoted text here. Click to load it

I have now resolved this issue.
Turns out it was a bad query comming from the VLE software that has now been



Site Timeline