How do I prevent Moodle-database problems? Help, please!

How do I prevent Moodle-database problems? Help, please!

by Gilbert Busana -
Number of replies: 3

We are running the Moodle-plateform for about 3 months now. We are very happy with it, but we recently had two major problems:

1. Last week, our Moodle-server "lost" all the journal entries from the students. Through phpMyAdmin, I found out, that the Journal-table in Mysql was corrupted. Repairing the mysql-table did bring the student-works up again.

2. Yesterday, our Moodle system needed nearly 3 minutes to show the main-page of several courses. Same thing for the journal-entries. Some days ago, it took less than 2 seconds to parse the same page!

The Moodle Homepage, login, course-listing was quite quick (a bit slower than usually, but one could live with it), but entering a course was sooooo damn long. I monitored the server and saw that the mysql-daemon took 30-40% of the processing power for the 3 Minutes it took to parse for example the journals.

The solution to the second problem was emptying the moodle-cache-files in the mysql-database. The system is now running fine again.

Is there any way to prevent these database-problems? Or do I have to repair tables regularly and empty the cache manually once a week?

Server data:

Xserve G5 (2 * 2 GHz)
2 GB RAM
Moodle is the only app running on it.

Average of ratings: -
In reply to Gilbert Busana

Re: How do I prevent Moodle-database problems? Help, please!

by P. Timothy Ervin -
I have basically the same set-up (G5 running X Server), run three fully used copies of Moodle, an experimental copy (close to 200 tables in the Moodle section), several other mysql backed pages, plus my heavy-load programs (FCP4, PS, etc), and have never had this kind of problem.

Corrupted tables could point to a faulty install of mysql. You might look into reinstalling that.

Cheers,
ptervin...under cloudy skies in Hiroshima
In reply to Gilbert Busana

Re: How do I prevent Moodle-database problems? Help, please!

by Sam O -
> Moodle is the only app running on it.

Is MySQL running on a different server?  What version of MySQL are you running?  I have had problems with the latest 4.1.x Darwin builds w/ MySQL.  I would recommend the latest 4.0.x build.  Are you using MyISAM tables or InnoDB tables?
In reply to Sam O

Re: How do I prevent Moodle-database problems? Help, please!

by Gilbert Busana -

Apache-php, Mysql, Moodle is running on the XServe:

Xserve G5 running Os X Server 10.3.5

mysql 3.23.49 with MyISAM tables

Apache/1.3.29

All application versions are the officially Apple-supported versions. I did not install any newer vesion than the one distributed with the system CD's.