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

Dropbox repository downloads files larger than max_cache_size on *every* run of cron

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.3.8, 3.4.5, 3.5.2
    • Fix Version/s: None
    • Component/s: Repositories
    • Labels:
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE

      Description

      The dropbox repository cron function has this logic:

      for all files in dropbox repo {
        if the file isnt in moodles file pool {
          download the file to check its file size
          if file is less than max cache size (say 1mb) store it in the file pool
        }
      }

      What this means in practice - is that all files larger than the cache size get their filesize checked on every invocation of the cron. So if you have a 1GB file for example - Moodle will download that every time the legacy cron tasks run, forever.

      Relatedly, the import uses file_put_contents - which requires that the content being saved be able to fit into the memory limit of the cron process.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              aolley Adam Olley
              Participants:
              Component watchers:
              Adrian Greeve, Mihail Geshoski, Peter Dias
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: