I am currently unable to backup any courses via Course Administration > Backup. Will either fail with a 504 timeout or produce an error, included below. Backups could be run without issue prior to our recent upgrade from v3.9 to v3.11.
Caches have been cleared, confirmed cron is running every minute. Other than that, I'm not sure how to go about troubleshooting this issue, not sure where the problem lies.
I do not know what the size of our courses are, what size the backup is I'm trying to take. I've installed a plugin that will hopefully give me that information shortly. If anyone could provide steps to try and troubleshoot this, find where the issue is I'd appreciate it.
Moodle 3.11.6+ (Build: 20220423)
Hosted on Cloudways
Debian GNU/Linux 10 (buster)
Linux 4.19.0-18-cloud-amd64
PHP 7.3
Fatal error: Uncaught ddl_change_structure_exception: DDL sql execution error (MySQL server has gone away DROP TEMPORARY TABLE mdl_backup_ids_temp) in /home/servername/applicationname/public_html/lib/dml/moodle_database.php:492 Stack trace: #0 /home/servername/applicationname/public_html/lib/dml/mysqli_native_moodle_database.php(1098): moodle_database->query_end(false) #1 /home/servername/applicationname/public_html/lib/ddl/database_manager.php(77): mysqli_native_moodle_database->change_database_structure('DROP TEMPORARY ...', Array) #2 /home/servername/applicationname/public_html/lib/ddl/database_manager.php(332): database_manager->execute_sql_arr(Array, Array) #3 /home/servername/applicationname/public_html/lib/dml/moodle_temptables.php(140): database_manager->drop_table(Object(xmldb_table)) #4 /home/servername/applicationname/public_html/lib/dml/moodle_database.php(405): moodle_temptables->dispose() #5 /home/servername/applicationname/public_html/lib/dml/my in /home/servername/applicationname/public_html/lib/dml/moodle_database.php on line 492
Warning: Error while sending QUERY packet. PID=2865 in /home/servername/applicationname/public_html/lib/dml/mysqli_native_moodle_database.php on line 1272
Error reading from database
Debug info: MySQL server has gone away
SELECT count(r.repositoryid)
FROM mdl_files f
LEFT JOIN mdl_files_reference r
ON r.id = f.referencefileid
JOIN mdl_backup_ids_temp bi
ON f.id = bi.itemid
WHERE bi.backupid = ?
AND bi.itemname = 'filefinal'
[array (
0 => '716d549bac4d91e8d4e880f0462f5ab9',
)]
Error code: dmlreadexception
Stack trace:
- line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
- line 1273 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
- line 1671 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
- line 1744 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
- line 1954 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
- line 522 of /backup/util/dbops/backup_controller_dbops.class.php: call to moodle_database->count_records_sql()
- line 2140 of /backup/moodle2/backup_stepslib.php: call to backup_controller_dbops::backup_includes_file_references()
- line 34 of /backup/util/plan/backup_execution_step.class.php: call to backup_store_backup_file->define_execution()
- line 181 of /backup/util/plan/base_task.class.php: call to backup_execution_step->execute()
- line 191 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
- line 145 of /backup/util/plan/backup_plan.class.php: call to base_plan->execute()
- line 419 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 175 of /backup/backup.php: call to backup_ui->execute()