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

Possible memory leakage in modinfo cache

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.0.4
    • 2.0
    • Dashboard (My home)
    • None
    • MOODLE_20_STABLE
    • MOODLE_20_STABLE
    • MDL-25191-master
    • Hide

      (sorry this is a crap test, but since I'm not able to reproduce it at the moment...)

      Difficulty: EASY

      1. Visit any course page. Make sure it appears without errors.
      2. Visit the /my/ page. Make sure it appears without errors

      Show
      (sorry this is a crap test, but since I'm not able to reproduce it at the moment...) Difficulty: EASY 1. Visit any course page. Make sure it appears without errors. 2. Visit the /my/ page. Make sure it appears without errors

      Hi, sorry I don't have reproduce steps but I get this error when I go to /my/ as admin in a Moodle 2 test install.

      The test install is not that big, 238 courses which mostly pretty much seem to just have a few assignments on each (I think these were automatically created by some manic unit test which maybe still exists? that would be a separate bug). Obviously as admin I do have access to all courses, but don't have a specific role on more than a few dozen.

      I could increase memory limit but it seems to me that (a) except on a really big site, users shouldn't need to do that, the default should be enough, and (b) it's possible that something inefficient is happening here that is causing it to blow the limit. So just filing this in case anyone wants to look at the trace.

      Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /fs2/www/html/sm449/coremoodle/lib/dml/pgsql_native_moodle_database.php on line 681

      Call Stack:
      0.0003 676280 1.

      {main}

      () /fs2/www/html/sm449/coremoodle/my/index.php:0
      0.4880 13677512 2. core_renderer->blocks_for_region() /fs2/www/html/sm449/coremoodle/my/index.php:148
      0.4881 13677512 3. block_manager->get_content_for_region() /fs2/www/html/sm449/coremoodle/lib/outputrenderers.php:899
      0.4881 13677512 4. block_manager->ensure_content_created() /fs2/www/html/sm449/coremoodle/lib/blocklib.php:304
      0.4881 13677728 5. block_manager->create_block_contents() /fs2/www/html/sm449/coremoodle/lib/blocklib.php:934
      0.4881 13678344 6. block_base->get_content_for_output() /fs2/www/html/sm449/coremoodle/lib/blocklib.php:882
      0.4882 13680376 7. block_base->formatted_contents() /fs2/www/html/sm449/coremoodle/blocks/moodleblock.class.php:232
      0.4882 13680376 8. block_course_overview->get_content() /fs2/www/html/sm449/coremoodle/blocks/moodleblock.class.php:279
      0.4910 13743560 9. print_overview() /fs2/www/html/sm449/coremoodle/blocks/course_overview/block_course_overview.php:96
      0.4998 13945816 10. forum_print_overview() /fs2/www/html/sm449/coremoodle/course/lib.php:856
      0.4998 13945896 11. get_all_instances_in_courses() /fs2/www/html/sm449/coremoodle/mod/forum/lib.php:1199
      0.5031 14030800 12. get_fast_modinfo() /fs2/www/html/sm449/coremoodle/lib/datalib.php:1481
      0.5033 14040048 13. rebuild_course_cache() /fs2/www/html/sm449/coremoodle/lib/moodlelib.php:3041
      0.5040 14042296 14. get_array_of_activities() /fs2/www/html/sm449/coremoodle/course/lib.php:1738
      0.5055 14063352 15. moodle_database->get_records() /fs2/www/html/sm449/coremoodle/course/lib.php:1061
      0.5055 14063976 16. moodle_database->get_records_select() /fs2/www/html/sm449/coremoodle/lib/dml/moodle_database.php:1024
      0.5055 14064288 17. pgsql_native_moodle_database->get_records_sql() /fs2/www/html/sm449/coremoodle/lib/dml/moodle_database.php:1075
      1.0376 14065656 18. pg_fetch_all() /fs2/www/html/sm449/coremoodle/lib/dml/pgsql_native_moodle_database.php:681

        1. silly.php
          0.6 kB
          Sam Marshall
        2. silly.php
          0.6 kB
          Sam Marshall

            quen Sam Marshall
            quen Sam Marshall
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Sam Hemelryk Sam Hemelryk
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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