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

Single enrolment flatfile processed concurrently by 20 consecutive crons

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.9.2
    • Fix Version/s: None
    • Component/s: Enrolments
    • Labels:
      None
    • Environment:
      SUSE Linux Enterprise Server 10, Apache 2.2.3, MySQL 5.0.26, PHP 5.2.5
      2 x 2.5 GHz CPUs and 4 GB RAM
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE

      Description

      Presumably this happens because it takes longer than 5 minutes for the first cron that encounters the file to process and delete it, so it's still there when the next cron starts - and so on for the next 18 crons, each one putting more load on MySQL and causing it to take even longer, exacerbating the problem.

      Our enrolment file is currently 20,716 lines long and the term hasn't started yet so it's going to get a lot bigger. This gets processed by around 20 crons (I get a separate log file for every cron and they each process every line) and this causes a huge load on the MySQL server, slowing down the whole site. Eventually after about 4 hours the database activity dies down and the file is eventually deleted. Just before the end I get a load of emails telling me to check the permissions because the flafile can't be unlinked, but the permissions are correct (and indeed the last cron successfully deletes it) - I'm guessing it just can't be deleted while there's still another cron processing it.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                4 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: