Quantcast
Channel: Backup and restore
Viewing all articles
Browse latest Browse all 6513

Problem with course restore

$
0
0

by Marian Kočenda.  

Hi everyone ....

our Moodle run on Windows 2012 IIS, MSSQL and PHP 5.6. There is a problem with RESTORE function. If I run restore in MOODLE, process runs about 10 minutes and results in error 500.
I tested restore on the same enviroment, only DB service was differrent. If restore function runs on MSSQL, it results in error, but if it runs on MYSQL, it results succesfully about 3 minutes.
As DB connector I use PHP SQLSRV.

My PHP settings:

max_execution_time = 600, memory_limit=512M, post_max_size=85M.

Size of course backup is about 30M.

In MSSQL Profiler I see problém in this

    <Event id="12" name="SQL:BatchCompleted">
      <Column id="1" name="TextData">UPDATE #mdl_backup_ids_temp SET newitemid = '3' WHERE id = '429'</Column>
      <Column id="9" name="ClientProcessID">6396</Column>
      <Column id="10" name="ApplicationName">PHP</Column>
      <Column id="11" name="LoginName">sa</Column>
      <Column id="12" name="SPID">57</Column>
      <Column id="13" name="Duration">441344598</Column>
      <Column id="14" name="StartTime">2016-12-13T22:34:51.623+01:00</Column>
      <Column id="15" name="EndTime">2016-12-13T22:42:12.967+01:00</Column>
      <Column id="16" name="Reads">58</Column>
      <Column id="17" name="Writes">0</Column>
      <Column id="18" name="CPU">0</Column>
    </Event>
    <Event id="12" name="SQL:BatchCompleted">
      <Column id="1" name="TextData">SELECT itemid, info FROM #mdl_backup_ids_temp WHERE backupid = N'8fc924645a547558e5063ac6810483da' AND itemname = N'user'</Column>
      <Column id="9" name="ClientProcessID">6396</Column>
      <Column id="10" name="ApplicationName">PHP</Column>
      <Column id="11" name="LoginName">sa</Column>
      <Column id="12" name="SPID">57</Column>
      <Column id="13" name="Duration">441344598</Column>
      <Column id="14" name="StartTime">2016-12-13T22:34:51.623+01:00</Column>
      <Column id="15" name="EndTime">2016-12-13T22:42:12.967+01:00</Column>
      <Column id="16" name="Reads">21</Column>
      <Column id="17" name="Writes">0</Column>
      <Column id="18" name="CPU">0</Column>
    </Event>

The running of commands takes quite a long time (approx. 6 minutes).

Thanks for advice


Viewing all articles
Browse latest Browse all 6513

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>