read_only on moodle mirror

read_only on moodle mirror

Mitchell Kennard發表於
Number of replies: 2

I recently upgraded from 1.9 to 2.5 and have a question about a read_only lock on the moodle database. Running 1.9, I had two mirrors of the production server running in the cloud with mysql replication and file synchronization for moodledata and the moodle files. I have done the same with 2.5 but ran into one difficulty. I have a read_only lock on the mysql database of each of the mirror sites so that I do not inadvertently modify the database (which would mess up replication). With 1.9 I was still able to log in to the mirror moodle site and navigate around (look at lessons, forum posts, etc) but could not post, etc. That was great because I could make sure that replication was indeed working correctly. Now that I have upgraded to 2.5, the moodle mirror site won't even let me login with a read_only lock on the database. Is there any way to change that?

Thanks,

Mitchell

評比平均分數: -
In reply to Mitchell Kennard

Re: read_only on moodle mirror

Ken Task發表於
Particularly helpful Moodlers的相片

Try adding $CFG->dbsessions=0; to config.php.

By default, version 2 of Moodle uses DB for session information.  There could be some other tables also.  Check error logs.

'spirit of sharing', Ken

 

In reply to Ken Task

Re: read_only on moodle mirror

Mitchell Kennard發表於

Thanks for the reply, Ken. Unfortunately, it didn't do the trick. It seems that the change was made in Moodle 2.0 so that database failures are now treated as fatal (http://docs.moodle.org/dev/DML_exceptions). It would be great if moodle could be put into readonly mode in the config.php file as suggested here (https://tracker.moodle.org/browse/MDL-15776). I've tried hacking the code a bit to see if there is an easy fix, but no luck so far.

If anyone else has an idea, I'm all ears.

Thanks,

Mitchell