Error: MySQL server has gone away

Error: MySQL server has gone away

by Maknus Kowalski -
Number of replies: 4

Hi,

When I added scorm packed, I get an error:

Debug info: MySQL server has gone away
SELECT f.id AS id, f.contenthash, f.pathnamehash, f.contextid, f.component, f.filearea, f.itemid, f.filepath, f.filename, f.userid, f.filesize, f.mimetype, f.status, f.source, f.author, f.license, f.timecreated, f.timemodified, f.sortorder, f.referencefileid, r.repositoryid AS repositoryid, r.reference AS reference, r.lastsync AS referencelastsync
FROM mdl_files f
LEFT JOIN mdl_files_reference r
ON f.referencefileid = r.id
WHERE f.pathnamehash = ?
[array (
0 => '83175e840a5821188824f612453a2604c292965c',
)]
Error code: dmlreadexception
Stack trace:
  • line 443 of /lib/dml/moodle_database.php: dml_read_exception thrown
  • line 1080 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1476 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
  • line 455 of /lib/filestorage/file_storage.php: call to moodle_database->get_record_sql()
  • line 482 of /lib/filestorage/file_storage.php: call to file_storage->get_file_by_hash()
  • line 504 of /lib/filestorage/zip_packer.php: call to file_storage->get_file()
  • line 556 of /lib/filestorage/stored_file.php: call to zip_packer->extract_to_storage()
  • line 269 of /mod/scorm/locallib.php: call to stored_file->extract_to_storage()
  • line 248 of /mod/scorm/lib.php: call to scorm_parse()
  • line 540 of /course/modlib.php: call to scorm_update_instance()
  • line 264 of /course/modedit.php: call to update_moduleinfo()
Average of ratings: -
In reply to Maknus Kowalski

Re: Error: MySQL server has gone away

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Some pertinent clues here...

https://dev.mysql.com/doc/refman/5.0/en/gone-away.html

You should probably start by finding and looking at your MySQL error log to see exactly why it 'went away'

In reply to Howard Miller

Odp: Re: Error: MySQL server has gone away

by Maknus Kowalski -
I cannot change the parametres of my hosting. The error occurs only when the SCORM package includes large single files, such as films. When the course files are not so large, everything works perfectly fine. Is there any way to fix it, any workaround for this, without changing the server settings? My wait timeout setting in MySQL = 30.
In reply to Maknus Kowalski

Re: Odp: Re: Error: MySQL server has gone away

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I don't know what your hosting is but it might be worth asking them. They should check their MySQL logs as something might actually be wrong/broken.