Moodle

IMS Enterprise enrolment does not lock itself out - can run many times concurrently

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.8.4
  • Fix Version/s: None
  • Component/s: Enrolments
  • Labels:
    None
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_18_STABLE

Description

When importing a large IMS Enterprise file, the process can take longer than the time between cron jobs, so the whole import starts again when the next cron job runs. This has a cumulative effect, with more and more simultaneous processes doing the same import and putting a debilitating load on the database server. The cause seems to be that the enrol_ims_prev_time setting in the mdl_config table is not updated until the import process is complete.

A suggested fix is to update that setting before doing the import.

Just after "if($fileisnew){" on line 265 of enrol/imsenterprise/enrol.php, add the line:

set_config('enrol_ims_prev_time', $filemtime); // Save previous time BEFORE doing the processing

Issue Links

Activity

Hide
Dan Poltawski added a comment -

Hmm, I guess this should be fixed with the cron locks petr added recently set_cron_lock()

Show
Dan Poltawski added a comment - Hmm, I guess this should be fixed with the cron locks petr added recently set_cron_lock()

People

Vote (2)
Watch (4)

Dates

  • Created:
    Updated: