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

Possible performance issue with climaintenance.html read

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_38_STABLE

      Description

      Moodle checks if file $CFG->dataroot/climaintenance.html exists on each request.
      If it does, maintenance mode is enabled.

      However, on slow filesystem (like NFS mount) this check may be slow - and on systems with many requests, it will affect the performance of Moodle.

      The check is done in:
      https://github.com/moodle/moodle/blob/master/lib/setup.php#L322

      if (file_exists("$CFG->dataroot/climaintenance.html")) {
      

      I suggest to create new $CFG entry and make the location of climaintenance.html configurable, with the default pointing to $CFG->dataroot/climaintenance.html. This could be configurable in config.php only, with corresponding documentation in config-dist.php.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              tmuras Tomasz Muras
              Participants:
              Component watchers:
              Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: