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

Possible performance issue with climaintenance.html read

    XMLWordPrintable

Details

    • 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

              Unassigned Unassigned
              tmuras Tomasz Muras
              Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: