Error when backing up a course

Re: Error when backing up a course

by Rick Jerz -
Number of replies: 1
Picture of Particularly helpful Moodlers Picture of Testers

I think that so far we know that small courses backup, big courses do not.  Somewhere, there is some resource that is constraining the bigger course backups.  We just need to find it.  We are off "fishing" a little.

Try setting max_execution_time to 2000.

Also, in Moodle, have you verified that your php.ini settings have taken effect?  Go to Site Admin | Server | php settings, and make sure that the setting changes that you have made are actually showing in the php settings.

In reply to Rick Jerz

Re: Error when backing up a course

by Dale Vanderhoof -

> have you verified that your php.ini settings have taken effect?

Yes. I made changes and then checked at the php settings page and the changes were reflected there.

I increased the max_execution_time to 2000 and tried another backup.It still threw the error. Here is the debug info:

Debug info: MySQL server has gone away
SELECT COUNT(*)
FROM see_backup_ids_temp b
JOIN see_user u ON u.id = b.itemid
WHERE b.backupid = ?
AND b.itemname = 'userfinal'
AND u.mnethostid != ?
[array (
0 => 'a5a6bc2d824c0148e0a35dc516baa962',
1 => '1',
)]
Error code: dmlreadexception

 

And here is the Stack Trace:

Stack trace:

  • line 479 of /lib/dml/moodle_database.php: dml_read_exception thrown
  • line 1175 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1551 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
  • line 1624 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
  • line 1834 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
  • line 477 of /backup/util/dbops/backup_controller_dbops.class.php: call to moodle_database->count_records_sql()
  • line 1771 of /backup/moodle2/backup_stepslib.php: call to backup_controller_dbops::backup_includes_mnet_remote_users()
  • line 88 of /backup/util/plan/backup_structure_step.class.php: call to backup_main_structure_step->define_structure()
  • line 181 of /backup/util/plan/base_task.class.php: call to backup_structure_step->execute()
  • line 177 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
  • line 120 of /backup/util/plan/backup_plan.class.php: call to base_plan->execute()
  • line 322 of /backup/controller/backup_controller.class.php: call to backup_plan->execute()
  • line 136 of /backup/util/ui/backup_ui.class.php: call to backup_controller->execute_plan()
  • line 131 of /backup/backup.php: call to backup_ui->execute()