Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-25446

MySQL server has gone away upgrade error

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.0
    • Administration
    • MySQL
    • MOODLE_20_STABLE
    • MOODLE_20_STABLE

    Description

      As reported by Jeffery Watkins:

      I am trying to upgrade a 1.9.10+ site to 2.0. I am getting this message:

      Debug info: MySQL server has gone away
      SELECT 'x' FROM mdl_files WHERE pathnamehash = ? LIMIT 0, 1
      [array (
      0 => 'fbf2ce18359e1764fc2a2b38db5ef9262cadd984',
      )]
      Stack trace:

      • line 391 of /lib/dml/moodle_database.php: dml_read_exception thrown
      • line 691 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      • line 1540 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_recordset_sql()
      • line 1525 of /lib/dml/moodle_database.php: call to moodle_database->record_exists_sql()
      • line 1509 of /lib/dml/moodle_database.php: call to moodle_database->record_exists_select()
      • line 142 of /lib/filestorage/file_storage.php: call to moodle_database->record_exists()
      • line 130 of /lib/filestorage/file_storage.php: call to file_storage->file_exists_by_hash()
      • line 333 of /lib/db/upgradelib.php: call to file_storage->file_exists()
      • line 359 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()
      • line 359 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()
      • line 100 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()
      • line 592 of /lib/db/upgrade.php: call to upgrade_migrate_files_courses()
      • line 1309 of /lib/upgradelib.php: call to xmldb_main_upgrade()
      • line 264 of /admin/index.php: call to upgrade_core()

      Tried upgrading via the command line:

      -->System
      ++ Increasing size of user idnumber field, this may take a while... ++
      !!! Error reading from database !!!
      !! MySQL server has gone away
      SELECT 'x' FROM mdl_files WHERE contenthash = ? LIMIT 0, 1
      [array (
      0 => '54a8f1a3cb047c47beac209d11316c7cba6b921e',
      )] !!
      !! Stack trace: * line 391 of /lib/dml/moodle_database.php: dml_read_exception thrown

      • line 718 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      • line 1553 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_recordset_sql()
      • line 1538 of /lib/dml/moodle_database.php: call to moodle_database->record_exists_sql()
      • line 1522 of /lib/dml/moodle_database.php: call to moodle_database->record_exists_select()
      • line 1173 of /lib/filestorage/file_storage.php: call to moodle_database->record_exists()
      • line 791 of /lib/filestorage/file_storage.php: call to file_storage->deleted_file_cleanup()
      • line 336 of /lib/db/upgradelib.php: call to file_storage->create_file_from_pathname()
      • line 359 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()
      • line 100 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()
      • line 592 of /lib/db/upgrade.php: call to upgrade_migrate_files_courses()
      • line 1309 of /lib/upgradelib.php: call to xmldb_main_upgrade()
      • line 106 of /admin/cli/upgrade.php: call to upgrade_core()
        !!
        <br />
        <b>Fatal error</b>: Exception thrown without a stack frame in <b>Unknown</b> on line <b>0</b><br />

      Attachments

        Activity

          People

            moodle.com Moodle HQ
            tsala Helen Foster
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              24/Nov/10