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

Cron - do gc_collect_cycles between tasks, and report memory usage

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.5
    • 2.3.4, 2.4.1
    • Libraries
    • MOODLE_23_STABLE, MOODLE_24_STABLE
    • MOODLE_25_STABLE
    • Hide

      Run cron:

      1. Using the CLI mode.
      2. Throuh the web interface.

      Confirm that it still works, and that the extra information displayed is helpful.

      Show
      Run cron: 1. Using the CLI mode. 2. Throuh the web interface. Confirm that it still works, and that the extra information displayed is helpful.

      These are two things we have done at the OU, but they are probably useful to everyone, so putting them up for review.

      1. PHP is not great at garbage collection. We have found in the past that adding calls to gc_collect_cycles() at appropriate places can really help long-running PHP processes, and cron.php falls into that category.

      2. Before and after each chunk of cron, output the current time and current memory usage. Then, when cron gets slow, or uses a lot of memory, you can easily see where the problem might be.

            timhunt Tim Hunt
            timhunt Tim Hunt
            Dan Poltawski Dan Poltawski
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Rossiani Wijaya Rossiani Wijaya
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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