Upgrade client from 1.6 > 1.9
October 19, 2008 – 22:49Upgrading client from Moodle 1.6 > 1.9, shouldn’t be too hard and I guess I can upgrade without step-upgrading to 1.7 and 1.8 first.
Based upgrade on this basic protocol:
Added one more check before upgrading:
- check database is utf8 (Database Migration)
All database tables were already in utf8 so that’s good. But database itself was in some swedish collation. Change collation to utf8_general:
ALTER DATABASE `moodle` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
Upgrade seems to run fine but new role assignments setup takes a looooong time. Here’s the caveat: there are about 8000 students in the Moodle of which 2841 are dummy users with no firstname or lastname. That’s all fine but ALL those dummy users are enrolled in about 23 courses making up for like 50.000 not needed role_assignments. Anyway, the role assignments are running superslow.
Tried to optimize mysql settings but that didn’t really seem to improve performance. Still I think I found a trick to not throw away the updateing already done -> I you restart apache, obviously the upgrade process is interupted. Then, if you go the upgrade page again, it will stop because while attempting to create new roles, it finds that those roles are already created. If you trunctate the role table, it will create the roles again and continue the role_assignment update where it left of. Hopefully it skips records already done.
continued 20081107
updated role_assignments table on office server. Second attempt to upgrade Moodle from 1.6 to 1.9. Again did standard procedure.
Upgrade ran fine until role_assignments taks
- restarted mysql server
- imported role_assigments table (first increase max_allowed_packet in /etc/my.cnf)
- truncated mdl_role table
- restarted upgrade
Upgrade again seemed to fail. However, as I already upgraded the table, I reasoned all the role settings should be fine. Also checked the mdl_role_allow_assign and mdl_role_allow_override, those were filled OK. So manually set role system to active:
insert into mdl_config (name,value) VALUES('rolesactive',1);
- restarted upgrade
- everything worked out fine
Upgrade was a succes. Set back the theme and checked some courses. Everything seems to be ok. The site is very slow though because the database is not tuned. Database tuning can be a pain because the OS is 32bit. And the OS is redhat-release 4
Installing eAccelerator went fine till I got this error:
PHP Warning: [eAccelerator] Can not create shared memory area in Unknown on line 0
Found a solution on the eAccelerator pages. Increased kernel shared mem max size to 268435456.
echo 268435456 > /proc/sys/kernel/shmmax
checked indexes and repaired where needed




















Sorry, comments for this entry are closed at this time.