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

"Site administration ► Reports ► Logs" gives "Fatal error: Allowed memory size of 134217728 bytes exhausted"

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.5, 2.1.2, 2.2
    • 2.0.6, 2.1.3
    • Course
    • None
    • MySQL
    • MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_20_STABLE, MOODLE_21_STABLE
    • Hide

      Adding limit to course/report/log/lib.php(353):

          $courseusers = get_enrolled_users($context, '', $selectedgroup, 'u.id, u.firstname, u.lastname, u.idnumber', 'lastname ASC, firstname ASC', 0, 10000);

      shows the page, but not all users.

      Is there a way to get the users list with less memory?

      Show
      Adding limit to course/report/log/lib.php(353): $courseusers = get_enrolled_users($context, '', $selectedgroup, 'u.id, u.firstname, u.lastname, u.idnumber', 'lastname ASC, firstname ASC', 0, 10000); shows the page, but not all users. Is there a way to get the users list with less memory?
    • Hide

      Going to site "Site administration ► Reports ► Logs" gives header and title "Choose which logs you want to see:" and below is empty.

      If error reporting in switched on, then PHP error occurs: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes) in /home/moodle/public_html/lib/dml/mysqli_native_moodle_database.php on line 820

      Expected result is the logs page.

      Show
      Going to site "Site administration ► Reports ► Logs" gives header and title "Choose which logs you want to see:" and below is empty. If error reporting in switched on, then PHP error occurs: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes) in /home/moodle/public_html/lib/dml/mysqli_native_moodle_database.php on line 820 Expected result is the logs page.

    Description

      Going to site "Site administration ► Reports ► Logs" runs out of memory on our Moodle installation.

      Our site:

      • PHP memory limit: 128M
      • ~ 75 000 rows in users table.

      Little debugging shows, that the problem is in:

      #0 /home/moodle/public_html/lib/accesslib.php(3259): mysqli_native_moodle_database->get_records_sql('SELECT u.id, u....', Array, 0, 0)
      #1 /home/moodle/public_html/course/report/log/lib.php(353): get_enrolled_users(Object(stdClass), '', 0, 'u.id, u.firstna...', 'lastname ASC, f...')
      #2 /home/moodle/public_html/course/report/log/index.php(157): print_log_selector_form(Object(stdClass), 0, '1318712400', '', '', '', 0, 0, 1, 'showashtml')
      #3 {main}

      Attachments

        Issue Links

          Activity

            People

              poltawski Dan Poltawski
              mangus Mart Mangus
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Rossiani Wijaya Rossiani Wijaya
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                28/Nov/11