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

cron execution dies two minutes after forum cron execution

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.7.2, 1.8.2, 1.9
    • 1.7.3, 1.8.3, 1.9
    • Administration
    • None
    • Any
    • MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
    • 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

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Nobody Nobody
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/Oct/07