Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.1
    • Fix Version/s: 2.0.4
    • Component/s: Backup
    • Labels:
      None
    • Environment:
      MAMP - Mac Duo 2 core - 4gb
    • Database:
      MySQL
    • Testing Instructions:
      Hide

      Backup one course under 2.1 (so backup extended limits will be used).
      Restore one 1.9 course under 2.1 (so restore and convert extended limits will be used)

      The 2 operations ends normally. This is one internal change not easily test-able,

      Show
      Backup one course under 2.1 (so backup extended limits will be used). Restore one 1.9 course under 2.1 (so restore and convert extended limits will be used) The 2 operations ends normally. This is one internal change not easily test-able,
    • Difficulty:
      Difficult
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-24684_master

      Description

      Hi Eloy, I don't know if you know about this:

      on my very slow mac (with all apps running it is quite slow), backing up a big course failed:

      [15-Oct-2010 14:20:07] loading controller from db
      [15-Oct-2010 14:20:07] checking plan security
      [15-Oct-2010 14:20:07] checking plan security
      [15-Oct-2010 14:20:07] setting controller status to 700
      [15-Oct-2010 14:20:07] saving controller to db
      [15-Oct-2010 14:20:07] calculating controller checksum 06dbcb65acf145e02e10921ad0a85ce2
      [15-Oct-2010 14:20:07] loading controller from db
      [15-Oct-2010 14:20:07] setting controller status to 800
      [15-Oct-2010 14:20:44] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /Users/jerome/Documents/Projects/Moodle_HEAD_hub/moodle/lib/filestorage/zip_archive.php on line 105

      I took the course from Mooch: "Deep Blue - rund um die Ozeane der Welt" (http://hub.moodle.org/local/hub/webservice/download.php?screenshotnumber=3&courseid=47&filetype=backup&remotemoodleurl=http%3A%2F%2Fhub.moodle.org). I restored it and try to back it up again.

      It always failed to this 105 line (closing the zip). We tested to backup this course on a fast machine, it worked fine.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Jérôme Mouneyrac added a comment -

            this course is 27Mb. I tried with Demo World of Water (from Mooch too), 12Mb and it works.

            Show
            Jérôme Mouneyrac added a comment - this course is 27Mb. I tried with Demo World of Water (from Mooch too), 12Mb and it works.
            Hide
            William G Beazley added a comment -

            Got almost identical error with large course but no error with empty course. Moodle 2.0.2 (Build: 20110221)

            Show
            William G Beazley added a comment - Got almost identical error with large course but no error with empty course. Moodle 2.0.2 (Build: 20110221)
            Hide
            Wen Hao Chuang added a comment - - edited

            another data point here... large course will NOT complete the backup and just quit quietly (I did not enable the debugging mode)... Moodle 2.0.2
            Should be very easy to reproduce if you have a course that has a lot of SWF or AVI files (say, each file around 5 - 8 MB, and you have 50 ~ 80 of them...backup will not work...

            Show
            Wen Hao Chuang added a comment - - edited another data point here... large course will NOT complete the backup and just quit quietly (I did not enable the debugging mode)... Moodle 2.0.2 Should be very easy to reproduce if you have a course that has a lot of SWF or AVI files (say, each file around 5 - 8 MB, and you have 50 ~ 80 of them...backup will not work...
            Hide
            Anthony V Parcero added a comment -

            I'm encountering a similar problem: course backups fail with a blank page being displayed, there are no error messages. The courses were created in 1.9 and then an in-place upgrade was done to bring them up to 2.0.2+ on our development site. Now I'd like to back them up and import them into the production site but the process seems to time-out or fail with no debug messages. The original course backups range in size from 1.5MB to 115MB

            Show
            Anthony V Parcero added a comment - I'm encountering a similar problem: course backups fail with a blank page being displayed, there are no error messages. The courses were created in 1.9 and then an in-place upgrade was done to bring them up to 2.0.2+ on our development site. Now I'd like to back them up and import them into the production site but the process seems to time-out or fail with no debug messages. The original course backups range in size from 1.5MB to 115MB
            Hide
            Brian King added a comment -

            For people seeing php timeout errors, this fix may work for you:

            In backup/backup.php and backup/restore.php, add this line to prevent the script timing out from the php time-out limit:

            set_time_limit(0); // added after the require_once statements
            

            That may not work for you though, if your course is really, really big and Apache is closing the connection after some time (which it will do at some point after not having received any output); in that case you'd have to tweak some Apache settings, too.

            Anyway, once MDL-22143 is fixed, this workaround should not be necessary.

            Show
            Brian King added a comment - For people seeing php timeout errors, this fix may work for you: In backup/backup.php and backup/restore.php, add this line to prevent the script timing out from the php time-out limit: set_time_limit(0); // added after the require_once statements That may not work for you though, if your course is really, really big and Apache is closing the connection after some time (which it will do at some point after not having received any output); in that case you'd have to tweak some Apache settings, too. Anyway, once MDL-22143 is fixed, this workaround should not be necessary.
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Sent to integration. It defines one initial timeout of 1 hour and access to extra memory in case it's necessary.

            Applied to the backup, restore and convert processes (all prone to be looong).

            Ciao

            PS: Note this will get a improvement once MDL-22143 is (finally) implemented as far as it will also leave the browser timeout problems out.

            Show
            Eloy Lafuente (stronk7) added a comment - Sent to integration. It defines one initial timeout of 1 hour and access to extra memory in case it's necessary. Applied to the backup, restore and convert processes (all prone to be looong). Ciao PS: Note this will get a improvement once MDL-22143 is (finally) implemented as far as it will also leave the browser timeout problems out.
            Hide
            Sam Hemelryk added a comment -

            Thanks Eloy - this has been integrated now.

            Show
            Sam Hemelryk added a comment - Thanks Eloy - this has been integrated now.
            Hide
            Helen Foster added a comment -

            Tested restoring a 1.9 backup to 2.1 (no problems) however I'm unable to upload really big backup files to the QA testing site, so I'm stopping testing and hoping someone else can take it on.

            Show
            Helen Foster added a comment - Tested restoring a 1.9 backup to 2.1 (no problems) however I'm unable to upload really big backup files to the QA testing site, so I'm stopping testing and hoping someone else can take it on.
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Hi!

            One trick to test that the time has been increased is to:

            1) in one local installation, edit the php.ini file and set the timeout (max_execution_time) to 2-3 seconds. Restart apache.
            2) run any backup / restore consuming more than 2-3 seconds
            3) if it finishes... then the test can be passed

            Ciao

            Show
            Eloy Lafuente (stronk7) added a comment - Hi! One trick to test that the time has been increased is to: 1) in one local installation, edit the php.ini file and set the timeout (max_execution_time) to 2-3 seconds. Restart apache. 2) run any backup / restore consuming more than 2-3 seconds 3) if it finishes... then the test can be passed Ciao
            Hide
            Helen Foster added a comment -

            Removing me as testers and hoping someone else can help.

            Show
            Helen Foster added a comment - Removing me as testers and hoping someone else can help.
            Hide
            Tim Hunt added a comment -

            Lots of people have tested lots of restores with testing other bugs, and they have worked.

            Also, Eloy said in the developers chat that the changes are safe. Therefore, marking as tested as recommended there. (http://moodle.org/mod/cvsadmin/view.php?conversationid=7775#c283178)

            Show
            Tim Hunt added a comment - Lots of people have tested lots of restores with testing other bugs, and they have worked. Also, Eloy said in the developers chat that the changes are safe. Therefore, marking as tested as recommended there. ( http://moodle.org/mod/cvsadmin/view.php?conversationid=7775#c283178 )
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Upstream-ized! Thanks!

            Show
            Eloy Lafuente (stronk7) added a comment - Upstream-ized! Thanks!

              People

              • Votes:
                7 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: