Thursday, March 29, 2012

A problem in my automated course backups

This am, I checked to see if the courses from 3 days ago would be gone from my backup directory, since I choose to keep only 2 and they were. That's the good news. I also have a message in my email that there was a problem with the backup. I followed a link into a moodle report for the automated backups. located here

domainname/report/backups

This is the error written to the php_error.log file

Default exception handler: Error writing to database Debug: Got a packet bigger than 'max_allowed_packet' bytes

I googled it and found this post on my favorite site stackoverflow.

Corrective steps taken

  • I opened the my.ini file located at wamp\bin\mysql\mysql5.5.20
  • I changed the values of two variables
  • max_allowed_packet = 100M
  • net_buffer_length=64K
  • I restarted the mysql service using the wamp service in the systray.
  • MySQL|Service|Restart Service

I checked the domainname/report/backups again, about 15 minutes later and the error was cleared up and the backupfile appeared in the folder.

I think this problem occurred because there are large images associated with the course that was croaking. Moodle 2.2 uses a different algorithm for storing images, no longer are the stored in a separate data area, but are stored with the course.

Moral of the story?

Backing up courses can be problematic. Be prepared to customize your database settings to account for unforeseen issues.

No comments:

Post a Comment