Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Paul de Quant 394 posts 1477 karma points
    Dec 09, 2020 @ 08:55
    Paul de Quant
    0

    Database Upgrade from 7 to 8 taking ages

    Hi,

    We're trying to upgrade our site from 7.15.3 to 8.4.2 and the upgrade process is taking forever. I can see there is a lot of SQL updates going on and I was wondering if these are available as SQL scripts that can be run directly in SSMS rather than waiting for the application to do this?

    I've rebuilt the indexes and cleared down the versions in an attempt to get the migration wizard to complete, but no joy. The longest I've let it run was about 10-11 hours, but quit in the end.

    Thanks

  • Marc Goodson 1451 posts 9716 karma points MVP 5x c-trib
    Dec 11, 2020 @ 07:20
    Marc Goodson
    1

    Hi Paul

    It will be running the following migrations:

    https://github.com/umbraco/Umbraco-CMS/tree/b68f1d44f1c5c640c0c49264b34ecd6a9caa6a44/src/Umbraco.Core/Migrations/Upgrade

    These are expressed in code, some steps you could probably work the SQL out that it's generating and run seperately eg

    https://github.com/umbraco/Umbraco-CMS/blob/b68f1d44f1c5c640c0c49264b34ecd6a9caa6a44/src/Umbraco.Core/Migrations/Upgrade/V80_0/DropPreValueTable.cs

    BUT other steps are 'converting data'

    https://github.com/umbraco/Umbraco-CMS/blob/b68f1d44f1c5c640c0c49264b34ecd6a9caa6a44/src/Umbraco.Core/Migrations/Upgrade/V80_0/ConvertRelatedLinksToMultiUrlPicker.cs

    which is what is taking so long! - and why rebuilding statistics, defragmenting sql indexes, empty recycle bin and unversioning the site helps reduce the time.

    There is a healthcheck for 'pre migration' to V8 - that you may or may not be aware of:

    https://our.umbraco.com/packages/developer-tools/pre-migration-health-checks/

    that should show if any particular index is missing on your SQL schema, before you migrate (if an index is missing it can slow the SQL operations down).

    Also check the console during upgrade in case there has been an error along the line, and it's stopped upgrading but the UI hasn't been told! - check the logs for your last attempt, any errors reported?

    Finally where is your db? - is it SQL Azure? and if so how many DTUs are available? You can temporarily scale this up to be super huge (remember to scale it down afterwards) - but also have found migrations of this scale to run faster with the database on my local machine,

    But yes it can take several hours, and the larger the site's content the longer it takes!

    regards

    Marc

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies