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

cron execution dies two minutes after forum cron execution

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.7.2, 1.8.2, 1.9
    • Fix Version/s: 1.7.3, 1.8.3, 1.9
    • Component/s: Administration
    • Labels:
      None
    • Database:
      Any
    • Affected Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      While monitoring cron execution under one big site I've noticed that the execution was dying after some undetermined period (happening in different steps of the cron execution).

      After some research, I think I've traced the cause of the problem. Explanation follows:

      1) admin/cron.php sets time_limit to 0 (unlimited)
      2) forum_cron is called and time_limit is set to 120
      3) cron execution continues and, after 2 minutes, dies!

      And this can be the cause of a lot of problems because some parts of the cron execution are never raised (clean-up tasks, backup...).

      There are two possible solutions:

      1) Forbid the use of "custom" time_limits within module/block... cron functions.
      2) In the admin/cron-php set time_limit to 0 after each module/block... cron call.

      Note that this is a problem since, at least, Moodle 1.7 ! And seems important!

      Ciao

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Oct/07