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

mod_folder download saturates localcache


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.11.10
    • 3.8.6, 3.9.18
    • General
    • None

      The issue:

      • A teacher has created a folder instance containing a number of very large files (in our case somewhere around 9GBytes in total)
      • A student tries to download the folder.
      • The download fails with an error message and a set of large temporary files are left in the localcache folder.

      There are 2 problems here.

      1. The temporary file is created in the localcache folder where it should be in the temp folder.
      2. The download_folder.php script will run into page timeout problems when downloaded file sets are large, resulting in download failure and in temporary files not being deleted.

      For the localcache issue the culprit is the get_request_storage_directory() (moodle/lib/setuplib.php:1620). The comment says that this function creates a folder in the temp directory tree, but the code creates the folder in localcache. Surely this is a bug.

      In our use case a number of students may try to download folder contents simultaneously. For each student the folder content is stored twice in the temp directory, requiring 10s or 100s of GBytes of storage space. The localcache is a small fast storage area. It cannot accommodate this kind of temporary storage.a

            Unassigned Unassigned
            daniel@edunao.com Daniel Miller
            1 Vote for this issue
            5 Start watching this issue


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