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

max_execution_time lowered during command line upgrade

XMLWordPrintable

    • MySQL
    • MOODLE_22_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • w17_MDL-31553_m23_clitimeout
    • Hide

      Running command line script with set_time_limit disabled may help:

      php -d disable_functions=set_time_limit upgrade.php

      Show
      Running command line script with set_time_limit disabled may help: php -d disable_functions=set_time_limit upgrade.php
    • Hide

      Create a test script in the root of the Moodle installation with the following code. Run it with the PHP command line interpreter. Should output "Pass" if the upgrade_set_timeout function does not alter the default max_execution_time.

      <?php
      define('CLI_SCRIPT', true);
      require_once 'config.php';
      $CFG->upgraderunning = time() + 3600;
      upgrade_set_timeout();
      echo ini_get('max_execution_time') == 0 ? "Pass" : "Fail";
      unset_config('upgraderunning'); // Clean up

      Show
      Create a test script in the root of the Moodle installation with the following code. Run it with the PHP command line interpreter. Should output "Pass" if the upgrade_set_timeout function does not alter the default max_execution_time. <?php define('CLI_SCRIPT', true); require_once 'config.php'; $CFG->upgraderunning = time() + 3600; upgrade_set_timeout(); echo ini_get('max_execution_time') == 0 ? "Pass" : "Fail"; unset_config('upgraderunning'); // Clean up

      During long-running command line upgrades (particularly from Moodle 1.9 to 2) it is possible to get the following error: "Fatal error: Maximum execution time of 300 seconds exceeded". This should not happen as the PHP CLI interface is hard-coded to set max_execution_time to 0 (unlimited) regardless of the php.ini setting.

            skodak Petr Skoda
            maherne Michael Aherne
            Dan Poltawski Dan Poltawski
            Rossiani Wijaya Rossiani Wijaya
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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