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

Creating the zip file when downloading all assignment submissions fails due to 30 second execution time out.

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Do not raise the maximum execution time limit in php.ini on your server beyond the dfault 30 seconds.

      Create an assignment with many large file submissions. (In our case it was four 25MB to 50MB .tif or .pdf files for each of the twelve students. Once patched, the resulting zip was ~1.2GB)

      Click Download all submissions.

      With the patch: The zip file should generate and download.

      Without the patch: If you server is slow enough, you will receive a PHP maximum execution time exceeded error.

      Show
      Do not raise the maximum execution time limit in php.ini on your server beyond the dfault 30 seconds. Create an assignment with many large file submissions. (In our case it was four 25MB to 50MB .tif or .pdf files for each of the twelve students. Once patched, the resulting zip was ~1.2GB) Click Download all submissions. With the patch: The zip file should generate and download. Without the patch: If you server is slow enough, you will receive a PHP maximum execution time exceeded error.
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-40245_master

      Description

      When attempting to download all assignment submissions the process can fail due to the function creating the zip file running into a maximum execution timeout.
      To avoid this we can add a time limit override of 300 seconds.

      This issue was found when assignments for a media subject were in excess of 1GB.

      My proposed fix for this is to increase the timeout to 300 seconds for both the assignment and assign module. My Commit can be found here:
      https://github.com/mdikih/moodle/commit/e2607b648adbf72faa8e6656c2c7fca30767eae7

      If you have any questions please feel free to ask.

      Testing procedure:
      1. Create an assignment or assign activity
      2. Upload several large assignments (Music or Media of some variety)
      3. Download all assignments

      4-if. If this patch is not applied eventually when the size of the assignments gets large enough a fatal error will be thrown saying the maximum execution timeout has been reached.
      4-else. Else if the patch is applied the file should download successfully.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                20 Vote for this issue
                Watchers:
                21 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  16/Nov/15