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

add optional timeout estimation to file_storage.php download_file_content() based on header with file size as it reportedly blocks upgrade.

XMLWordPrintable

      the has been a report about an upgrade going awry based on timeouts as initially reported in MDL-26580 at
      http://tracker.moodle.org/browse/MDL-26580?focusedCommentId=106462&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-106462
      (near 'file_storage.php')

      The approach in that bug was to help alleviate upgrading timeout pains however the solution was partially integrated leaving out the timeout estimation for scrom/locallib.php:create_file_from_url() -> donwload_file_content().

      This bug is about a improving the suggested fix in MDL-26580.

      SamH and Eloy have discussed and suggested that its better to have timeouts as an option, something like:

      /lib/filestorage/file_storage.php:694:
      public function create_file_from_url($file_record, $url, array $options = NULL, $usetempfile = false, $usetimeout = false)

      ./mod/scorm/locallib.php:189:
      if ($packagefile = $fs->create_file_from_url($file_record, $scorm->reference, true)) {

      ./lib/filelib.php:923:
      function download_file_content($url, $headers=null, $postdata=null, $fullresponse=false, $timeout=300, $connecttimeout=20, $skipcertverify=false, $tofile=NULL, $calctimeout= false) {

      followed by some similar timeout code : https://github.com/nebgor/moodle/commit/2a083e9774dbd6b7d258d346fa319a918645e05b

            nebgor Aparup Banerjee
            nebgor Aparup Banerjee
            Sam Hemelryk Sam Hemelryk
            Andrew Davis Andrew Davis
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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