Course backup error message included below. The checksum was omitted below because it is 4.9 million characters long!
Importing the course created slightly different error message, include below without checksum again. Message 'Debug info: Got a packet bigger than 'max_allowed_packet' bytes'
The checksum column in the backup_controllers table is varchar(32), so that insert isnt going to work even if the packet size is increased. Im inclined to believe the checksum is the issue not max_allowed_packet.
Other course backups are working.
Any suggestions to fix the checksum?
------environment moodle 4.5.1-----
---------backup error message-----------
Error writing to database
More information about this error
Debug info: MySQL server has gone away
INSERT INTO mdl_backup_controllers (backupid,operation,type,itemid,format,interactive,purpose,userid,status,execution,executiontime,checksum,controller,timecreated,timemodified) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
[array (
0 => '89a078e57ae74cf0ae90399b105529cf',
1 => 'backup',
2 => 'course',
3 => 10904,
4 => 'moodle2',
5 => 1,
6 => 10,
7 => '3',
8 => 500,
9 => 1,
10 => 0,
11 => '857d488f786bb722a857cf92088e575f',
12 => '
13 => 1750423028,
14 => 0,
)]
Error code: dmlwriteexception
Stack trace:
line 500 of \lib\dml\moodle_database.php: dml_write_exception thrown
line 293 of \lib\dml\moodle_read_slave_trait.php: call to moodle_database->query_end()
line 1448 of \lib\dml\mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->query_end()
line 1494 of \lib\dml\mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
line 97 of \backup\util\dbops\backup_controller_dbops.class.php: call to mysqli_native_moodle_database->insert_record()
line 592 of \backup\controller\backup_controller.class.php: call to backup_controller_dbops::save_controller()
line 167 of \backup\util\ui\base_ui.class.php: call to backup_controller->save_controller()
line 224 of \backup\backup.php: call to base_ui->save_controller()
-----------course import error message---------
Error writing to database
Debug info: Got a packet bigger than 'max_allowed_packet' bytes
INSERT INTO mdl_backup_controllers (backupid,operation,type,itemid,format,interactive,purpose,userid,status,execution,executiontime,checksum,controller,timecreated,timemodified) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
[array (
0 => '371c8056ed8be775bb93ed5a8420d45d',
1 => 'backup',
2 => 'course',
3 => '10904',
4 => 'moodle2',
5 => 1,
6 => 20,
7 => '3',
8 => 500,
9 => 1,
10 => 0,
11 => 'cce9daf2a6d755737b5956d43fa55614',
12 => '
13 => 1750423840,
14 => 0,
)]
Error code: dmlwriteexception
Stack trace:
line 500 of \lib\dml\moodle_database.php: dml_write_exception thrown
line 293 of \lib\dml\moodle_read_slave_trait.php: call to moodle_database->query_end()
line 1448 of \lib\dml\mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->query_end()
line 1494 of \lib\dml\mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
line 97 of \backup\util\dbops\backup_controller_dbops.class.php: call to mysqli_native_moodle_database->insert_record()
line 592 of \backup\controller\backup_controller.class.php: call to backup_controller_dbops::save_controller()
line 167 of \backup\util\ui\base_ui.class.php: call to backup_controller->save_controller()
line 240 of \backup\import.php: call to base_ui->save_controller()
Error reading from database
Debug info: MySQL server has gone away
SELECT
bi.id,
COALESCE(bp.id, bs.id) AS blockpositionid,
bi.blockname,
bi.parentcontextid,
bi.showinsubcontexts,
bi.pagetypepattern,
bi.requiredbytheme,
bi.subpagepattern,
bi.defaultregion,
bi.defaultweight,
COALESCE(bp.visible, bs.visible, 1) AS visible,
COALESCE(bp.region, bs.region, bi.defaultregion) AS region,
COALESCE(bp.weight, bs.weight, bi.defaultweight) AS weight,
bi.configdata
, ctx.id AS ctxid, ctx.path AS ctxpath, ctx.depth AS ctxdepth, ctx.contextlevel AS ctxlevel, ctx.instanceid AS ctxinstance, ctx.locked AS ctxlocked
FROM mdl_block_instances bi
JOIN mdl_block b ON bi.blockname = b.name
LEFT JOIN mdl_block_positions bp ON bp.blockinstanceid = bi.id
AND bp.contextid = ?
AND bp.pagetype = ?
AND bp.subpage = ?
LEFT JOIN mdl_block_positions bs ON bs.blockinstanceid = bi.id
AND bs.contextid = ?
AND bs.pagetype = ?
AND bs.subpage = ?
LEFT JOIN mdl_context ctx ON (ctx.instanceid = bi.id AND ctx.contextlevel = ?)
WHERE
(bi.parentcontextid IN (?, ?) OR (bi.showinsubcontexts = 1 AND bi.parentcontextid IN (?,?)))
AND bi.pagetypepattern IN (?,?,?,?)
AND (bi.subpagepattern IS NULL OR bi.subpagepattern = ?)
AND (bp.visible = 1 OR bp.visible IS NULL) AND (bs.visible = 1 OR bs.visible IS NULL)
AND b.visible = 1
AND (bi.requiredbytheme = 0)
ORDER BY
COALESCE(bp.region, bs.region, bi.defaultregion),
COALESCE(bp.weight, bs.weight, bi.defaultweight),
bi.id
[array (
0 => 1485669,
1 => 'backup-import',
2 => '',
3 => 1,
4 => 'backup-import',
5 => '',
6 => 80,
7 => 1485669,
8 => 1,
9 => '247',
10 => '1',
11 => 'backup-import',
12 => 'backup-import-*',
13 => 'backup-*',
14 => '*',
15 => '',
)]
Error code: dmlreadexception
Stack trace:
line 497 of \lib\dml\moodle_database.php: dml_read_exception thrown
line 293 of \lib\dml\moodle_read_slave_trait.php: call to moodle_database->query_end()
line 1303 of \lib\dml\mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->query_end()
line 791 of \lib\blocklib.php: call to mysqli_native_moodle_database->get_recordset_sql()
line 1812 of \lib\pagelib.php: call to block_manager->load_blocks()
line 1132 of \lib\pagelib.php: call to moodle_page->starting_output()
line 883 of \lib\classes\output\core_renderer.php: call to moodle_page->set_state()
line 2644 of \lib\classes\output\core_renderer.php: call to core\output\core_renderer->header()
line 179 of \lib\setuplib.php: call to core\output\core_renderer->fatal_error()
line ? of unknownfile: call to default_exception_handler()