Restore, Backup and Import fail due to dmlwrite exception

Restore, Backup and Import fail due to dmlwrite exception

by Emma McAllister -
Number of replies: 5
We've recently changed the server Moodle is hosted on and upgraded to Moodle 2.8.  When I try to back-up, restore and import from a few of the courses on the new server I get a dmlwriteexception.  When I turn debugging on I get the error below.   This only happens on two of the larger courses.  I've done a bit of research online to see about the issue, it seems to be something to do with MySQL, but I haven't been able to find a fix - has anyone any ideas?


error message on restore


Average of ratings: -
In reply to Emma McAllister

Re: Restore, Backup and Import fail due to dmlwrite exception

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Emma,

Sorry I don't understand things at all, however I hope that info in MDL-46235 can be of help to you. Another thing that I hope for is for someone knowledgeable to write some documentation about the issue. wink

(Thanks to Tim for mentioning your post and to Eloy for identifying the relevant issue.)

In reply to Helen Foster

Re: Restore, Backup and Import fail due to dmlwrite exception

by Emma McAllister -

Thanks Helen, from the MDL-46235 it looks like it's quite a big change to the MySQL settings, so I'm going to get someone with a bit more experience in SQL to help with this.

In reply to Emma McAllister

Re: Restore, Backup and Import fail due to dmlwrite exception

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

I would guess that it is the checksum field (12 has the huge entry and if you count across your column headings, you will get to checksum).  You could try going to the backup controller table and changing that column as suggested by the error message.  However, BACK UP first!! 

No guarantees this will work or not break something but I know that I have been able to force some similar things through in this manner.

Oh, did I mention BACK UP First!!!!



In reply to Emma McAllister

Re: Restore, Backup and Import fail due to dmlwrite exception

by Daniel Costa -

Hi Emma and everybody,


I´m also having the same issue in local, using moodle 3.0, PHP 5.6.3 and MySQL 5.0.11 .

I can backup and restore "small" courses. When I try to backup or restore a "big" course, I get the same error Emma got. I assume that checksum column cannot record the huge data generated. 

I tried several solutions according to:

https://tracker.moodle.org/browse/MDL-47387

https://tracker.moodle.org/browse/MDL-46235

https://tracker.moodle.org/browse/MDL-46971

None of them worked for me. 


Anyone sorted this out or are having the same issue?


TIA


Daniel

In reply to Daniel Costa

Re: Restore, Backup and Import fail due to dmlwrite exception

by Daniel Costa -

Hi everybody,

I could solve the issue in local, increasing innodb_log_file_size to a higher value (100mb) and also innodb_buffer_pool_sizeto 4x (400mb) .

Here some references to the solution:

https://tracker.moodle.org/browse/MDL-46235

http://dba.stackexchange.com/questions/75328/row-size-error-with-mysql/75333#75333

Cheers,

Daniel


Average of ratings: Useful (2)