Upgrading from 3.9.1 to 3.10 fails with stack trace

Upgrading from 3.9.1 to 3.10 fails with stack trace

by Andrew Steele -
Number of replies: 2

I decided that I would move up to Moodle 3.10 from version 3.9.1

I followed my standard process:

  1. Backup the site files and sql
  2. Move the site files to a backup location
  3. Unpack the new version of Moodle to the server and copy the site configuration into that directory
  4. Access the site through a web browser
  5. The server requirements all pass
  6. Upgrading begins with the standard warnings
  7. Upgrade process then eventually hangs and displays the errors below
  8. Moodle upgrade fails but the database is updated in part and the site code doesn't match
  9. Use the backups to restore the original SQL and site pages
  10. Upgrade to version 3.9.3 works
Stack trace: 
  • line 492 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
  • line 1098 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 77 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
  • line 427 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
  • line 372 of /lib/ddl/database_manager.php: call to database_manager->install_from_xmldb_structure()
  • line 659 of /lib/upgradelib.php: call to database_manager->install_from_xmldb_file()
  • line 1922 of /lib/upgradelib.php: call to upgrade_plugins()
  • line 713 of /admin/index.php: call to upgrade_noncore()
Actually tried the switch to 3.10 twice with the same result. Any suggestions gratefully received.

Andrew
Average of ratings: -
In reply to Andrew Steele

Re: Upgrading from 3.9.1 to 3.10 fails with stack trace

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

Is there a database command (e.g. ALTER TABLE) that appears before the stack trace? Can you share a screenshot of the error (crop or hide anything you don't want to share).

What additional plugins and themes are installed? Are the versions of these being upgraded too?

In reply to Leon Stringer

Re: Upgrading from 3.9.1 to 3.10 fails with stack trace

by Andrew Steele -
Thanks Leon.

I didn't have the screenshots you requested so tried to recreate the error. In doing so I paid closer attention to what was happenig on screen.

I noticed that the database update process hung at qtype_shortanswer.

After more than five minutes everything lurched into life and successfully completed. I wonder, but likely will never know, whether the process hung yesterday but instead of completing timed out. Or it could be that upgrading from a 3.9.3 site didn't suffer the same challenges.

But it looks like we'll never know.

Meanwhile I tried the second of the Moodle sites I host and that processed without any trouble.