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

Allowed memory size exhausted in the course competencies page

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.1
    • Fix Version/s: 3.3.4, 3.4.1
    • Component/s: Competencies
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a competency framework (Site administration -> Competencies -> Competency Frameworks)
      2. Add 2 competencies to it. (Click on the framework name, select the top node in the competency tree and click "Add competency")
      3. Now go to a course and choose "Competencies" from the course navigation, then click "Add add competencies to course".
      4. Select all the new competencies from the new competency framework and click "Add" to add the competencies to the course.
      5. Verify that the course competencies page contains the text: 

        Competencies most often not proficient in this course

        followed by links to the 2 competencies that were added to the course.

      Show
      Create a competency framework (Site administration -> Competencies -> Competency Frameworks) Add 2 competencies to it. (Click on the framework name, select the top node in the competency tree and click "Add competency") Now go to a course and choose "Competencies" from the course navigation, then click "Add add competencies to course". Select all the new competencies from the new competency framework and click "Add" to add the competencies to the course. Verify that the course competencies page contains the text:  Competencies most often not proficient in this course followed by links to the 2 competencies that were added to the course.
    • Workaround:
      Hide

      Add a raise_memory_limit(MEMORY_EXTRA) in the get_least_proficient_competencies_for_course() method.

      Show
      Add a raise_memory_limit(MEMORY_EXTRA) in the get_least_proficient_competencies_for_course() method.
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-59970-master

      Description

      We have a Memory error in the course competencies page:

      PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 7 bytes) in /app/apache2/htdocs/moodle/lib/dml/mysqli_native_moodle_database.php on line 1188
      

      The error is caused by a slow sql querie in the method get_least_proficient_competencies_for_course() in file:
      /app/apache2/htdocs/moodle/competency/classes/user_competency_course.php

      We are not able to reproduce easely for the moment. Some course have the problem, other, not.
      Also, we have a huge Moodle environnement with many competencies. The tested course have no competencies.

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/Jan/18