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

when regrading quizzes with lots of attempts, php runs out of memory

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.1.6, 2.2.3
    • 2.1.5, 2.2.2
    • Questions, Quiz
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • Hide

      At the end of the method regarde_attemp(), setting chuncky objects to NULL and using
      gc_collect_cycles() to force collection of any existing garbage cycles.

      Thanks to Tim.

      Show
      At the end of the method regarde_attemp(), setting chuncky objects to NULL and using gc_collect_cycles() to force collection of any existing garbage cycles. Thanks to Tim.
    • Hide

      It is difficult to reproduce this, if you do not have the right (amount of) data.

      Paul Johnson was finding that it ran out of memory with about 100 attempts, with our default memory limit of 128MB.)

      1) Create a quiz,
      2) add a couple of questions to the quiz.
      3) attempt the quiz as student(s)
      4) as admin, under Navigation->yourquiz->Results->Grades, click on "Regarde all" or "Dryrun a full regrade" (let it show all attempts).
      In terms of memory leak consider the following:
      When memory limit = 128MB, it fails at about 100 attempts.

      (The other way to test this is to add print_object(memory_get_usage()); inside regrade_attempt(), and check that the memory usage stays about constant, rather than increasing linearly.)

      Show
      It is difficult to reproduce this, if you do not have the right (amount of) data. Paul Johnson was finding that it ran out of memory with about 100 attempts, with our default memory limit of 128MB.) 1) Create a quiz, 2) add a couple of questions to the quiz. 3) attempt the quiz as student(s) 4) as admin, under Navigation->yourquiz->Results->Grades, click on "Regarde all" or "Dryrun a full regrade" (let it show all attempts). In terms of memory leak consider the following: When memory limit = 128MB, it fails at about 100 attempts. (The other way to test this is to add print_object(memory_get_usage()); inside regrade_attempt(), and check that the memory usage stays about constant, rather than increasing linearly.)

      when regarding quizzes with lots of attempts, php runs out of memory and does not finish "Regarde all" or "Dry run a full regarde" and cuases an error like "HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfil the request."

      PHP.log however, indicates a memory leak

            mkassaei Mahmoud Kassaei
            mkassaei Mahmoud Kassaei
            Tim Hunt Tim Hunt
            Dan Poltawski Dan Poltawski
            Jason Fowler Jason Fowler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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