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

Quiz 'Regrade all' causes timeouts with large numbers of participants - improve performance/look at asynchronous options

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.2, 2.4.5, 2.5.1
    • Fix Version/s: 2.4.6, 2.5.2
    • Component/s: Quiz
    • Labels:
    • Testing Instructions:
      Hide

      1. You need a quiz with a significant number of attempts.

      2. Regrade it in all the ways possible:
      2a. Regrade all
      2b. Dry-run a full regrade
      2c. Regrade selected attempts
      2d. Regrade attempts marked as needing regrading

      3. Verify that you get a progress bar while you wait.

      To get 2d to appear, you need to alter a question (e.g. change a true-false question so that the right answer is true, not false) then dry run a regrade. If you do that, some attempts will be marked as needing a regrade, and then you will see the extra button.

      Show
      1. You need a quiz with a significant number of attempts. 2. Regrade it in all the ways possible: 2a. Regrade all 2b. Dry-run a full regrade 2c. Regrade selected attempts 2d. Regrade attempts marked as needing regrading 3. Verify that you get a progress bar while you wait. To get 2d to appear, you need to alter a question (e.g. change a true-false question so that the right answer is true, not false) then dry run a regrade. If you do that, some attempts will be marked as needing a regrade, and then you will see the extra button.
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      We've seen some occasional issues with academics regrading quizzes and getting timeouts. These are typically on quizzes with > 100 participants and large number of questions.

      I realise that there is possibly some (more) tuning that we can do to prevent the timeouts, but I wonder whether perhaps regrades should be done asynchronously on cron. I'm not sure of the potential issues that this could cause, so I'm just throwing it out there for your thoughts.

      Moving to an asynchronous regrade would mean that users aren't sat hanging and waiting while their session is locked and they're forced to go and make a cup of tea so it would also give a perceived performance improvement - especially if we had some form of live polling to fetch the status (as proposed in the backup plan too).

      Here's a PERF log output for one that failed last night. This quiz had 108 responding users with 47 questions:

      [Thu Nov 08 17:16:53 2012] [error] [client 148.88.22.10] PERF: /mod/quiz/report.php?id=49677&mode=overview&attempts=enrolled_with&onlygraded=&onlyregraded=&slotmarks=1&sesskey=GXaxzvxnbD&regradeall=Regrade+all time: 148.166105s memory_total: 16582776B (15.8MB) memory_growth: 15768696B (15MB) memory_peak: 16994384B (16.2MB) includecount: 379 contextswithfilters: 1 filterscreated: 7 textsfiltered: 33369 stringsfiltered: 0 langcountgetstring: 1592 langcountmemcache: 1583 langcountdiskcache: 9 db reads/writes: 19807/43741 ticks: 14817 user: 3271 sys: 345 cuser: 0 csys: 0 serverload: 0.04 Session: 24.2KB , referer: https://modules.lancs.ac.uk/mod/quiz/report.php?id=49677&mode=overview

      (We have now increased our timeout substantially so that they no longer see the timeouts)

        Attachments

          Activity

            People

            Assignee:
            timhunt Tim Hunt
            Reporter:
            dobedobedoh Andrew Nicols
            Peer reviewer:
            Andrew Nicols
            Integrator:
            Damyon Wiese
            Tester:
            Marina Glancy
            Participants:
            Component watchers:
            Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              9/Sep/13