-
Bug
-
Resolution: Fixed
-
Minor
-
2.3.4, 2.4.1
-
MOODLE_23_STABLE, MOODLE_24_STABLE
-
MOODLE_25_STABLE
-
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.