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

File system API should periodically clean up .tmp files

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.9.1
    • Fix Version/s: None
    • Component/s: Files API
    • Affected Branches:
      MOODLE_39_STABLE

      Description

      On very large sites there is some small base level of temporary file uploading failure.

      I don't know the exact cause but I'd guess something like a file is uploaded to php tmp space, then it is moved into a File API .tmp and then by pure bad luck something borks (maybe a php timeout or a container gets reaped?) and the file is never fully copied into the correct place, somewhere around here:

      https://github.com/moodle/moodle/blob/b88f1a84bfa944b5890728ea20c8ebd888fb9b3f/lib/filestorage/file_system_filedir.php#L380-L397

      So thinking we want some cleanup task maybe once a week which just looks for all old .tmp files in filedir and deletes them.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            brendanheywood Brendan Heywood
            Participants:
            Component watchers:
            Matteo Scaramuccia, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: