Upgrading from 2.8 to 3.0 is taking hours

Upgrading from 2.8 to 3.0 is taking hours

- Amanda Doughty の投稿
返信数: 5
画像 Core developers 画像 Plugin developers

We have carried out a dry run of our 2.8 - 3.0 upgrade on a test server and it took 9 hrs. We are in the process of resetting our test server to run it again today with a complete copy of our live data. Our Unix team say that our DB is 150GB and the upgrade requires the same amount of temp space in order to run.

Does anybody know why this would be? And has anyone else had similar issues? Or no issues?

Thank you

Amanda Doughty への返信

Re: Upgrading from 2.8 to 3.0 is taking hours

- Tim Hunt の投稿
画像 Core developers 画像 Documentation writers 画像 Particularly helpful Moodlers 画像 Peer reviewers 画像 Plugin developers

The upgrade is formed of a number of separate steps (each separate if statement in https://github.com/moodle/moodle/blob/master/lib/db/upgrade.php#L855). To say more, we really need to know which step it is that is being slow.

You might be able to work that out by turning on more logging on you rdatabase server, or you might need to edit the upgrade_main_savepoint function, so that it outputs some progress information every time it is called.

It would be very helpful to know which part of the upgrade is slow. Then we might be able to do somethign about it.

Tim Hunt への返信

Re: Upgrading from 2.8 to 3.0 is taking hours

- Amanda Doughty の投稿
画像 Core developers 画像 Plugin developers

Looks like I can get this info from upgrade_log? We have reverted our test system for the next dry run. I'll post more info here when it's finished.

Amanda Doughty への返信

Re: Upgrading from 2.8 to 3.0 is taking hours

- Michael Aherne の投稿
画像 Core developers 画像 Particularly helpful Moodlers 画像 Peer reviewers 画像 Plugin developers

The place we're noticing the upgrade from 2.8 to 3.0 taking a long time is in logstore_standard, where it's adding a foreign key to the database table. You don't mention what database you're using but as far as I remember MySQL takes up a lot of temp space when adding indexes or keys, so it could be something to do with that.