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

SQL Server 2019 backup/restore stuck

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.7 regressions, 3.11.2
    • Backup
    • None
    • MOODLE_311_STABLE

      Few weeks ago we migrated Moodle DB from MS SQL Server 2008 to 2019 (due to Moodle min. requirement of new versions).
      After few days we upgraded Moodle (3.7.? > 3.11.2).

      After then we noticed the auto course backups (by cron) were not created successfully,
      the problem started after DB migration to SQL Server 2019 (Moodle 3.7.?).

      Some courses are backuped OK, some course backup causes process stuck (PHP uses no CPU, no disk I/O, no net/db communication).
      Course recovering stucks PHP process too.

      I guess the problem comes from DB query lock using temp table #mdl_backup_ids_temp.

      I watched PHP connection session queries (see shared folder) and the last one (or two) ale completed after the PHP process is killed (by PHP/IIS timeout).

      Moodle is running on:

      • Windows Server 2019 Std
      • SQL Server 2019 Std
      • IIS 10.0
      • PHP 7.3.30
      • sqlsrv driver 5.9.0

      Same issue with older version of:

      • PHP 7.3.26
      • sqlsrv driver 5.8.1

      I tried restore problem course backups in fresh instaled Moodle and new database (SQL Server 2019), but course restoring stucked PHP process too.

      But Moodle with DB on MS SQL Server 2017 runs without any issue.

      Steps to reproduce:

      • use Moodle with DB running on MS SQL Server 2019
      • recover SQLsrv2019_unrestorableCourse_anonymUserData.mbz (in shared folder)

      Mentoned files:
      https://drive.google.com/drive/folders/1SjvVWdZ439wD7iYH8vSep56JXXOUw_58?usp=sharing

      Possible related issues:
      https://tracker.moodle.org/browse/MDLSITE-6045

        1. DB session SQL queries.png
          158 kB
          Lukáš Chuchma
        2. SQL queries after restore process.tsv
          337 kB
          Lukáš Chuchma
        3. SQLsrv2019_unrestorableCourse_anonymUserData.mbz
          270 kB
          Lukáš Chuchma

            stronk7 Eloy Lafuente (stronk7)
            chuchma.l Lukáš Chuchma
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.