Moodle

"Allowed memory exhausted" despite increase

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Not a bug
  • Affects Version/s: 1.9.6
  • Fix Version/s: None
  • Component/s: Gradebook
  • Labels:
    None
  • Environment:
    LAMP: Ubuntu 8.10, PHP5.2.4, Apache 2.x, MySQL 5.0.x
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_19_STABLE

Description

I received an 'out of memory' type error when trying to access the gradebook in a fairly small course with only a few resouces (PPT, web pages and a couple of Feedback activities). The error is as follows:

"Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate 78 bytes) in /srv/moodle/releases/20091029132050/lib/grade/grade_object.php on line 68"

I upped the memory_limit variable on line 208 of lib/setup.php to 112Mb (Up by 16Mb) and deployed the changes, but got a very similar error:

"Fatal error: Allowed memory size of 117440512 bytes exhausted (tried to allocate 76 bytes) in /srv/moodle/releases/20091030144011/lib/grade/grade_object.php on line 403"

And when I add another 16Mb for a total of 128Mb:

"Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 80 bytes) in /srv/moodle/releases/20091030145244/grade/report/grader/lib.php on line 403"

I can find no other gradebook within our Moodle where this problem exists.

I'll leave this as-is for now but will continue to add memory to the limit to see if any amount will let the script run.

I put this in as a 'major' priority as it does stop the gradebook from being used.

Activity

Hide
Paul Vaughan added a comment -

Solution: The course has over 400 students and over 300 assessments which had been added manually (and I didn't know about them).

After increasing the memory limit in steps up to 160Mb the page eventually loads showing me a colossal grade book, page 1 of 5. So it was a genuine out of memory issue as I didn't anticipate the gradebook being that big.

Sorry, not a bug after all.

Show
Paul Vaughan added a comment - Solution: The course has over 400 students and over 300 assessments which had been added manually (and I didn't know about them). After increasing the memory limit in steps up to 160Mb the page eventually loads showing me a colossal grade book, page 1 of 5. So it was a genuine out of memory issue as I didn't anticipate the gradebook being that big. Sorry, not a bug after all.
Hide
Petr Škoda (skodak) added a comment -

yes, moodle needs more memory with each release Moodle is designed to change max available memory value automatically, sometimes we do not raise the value enough, sometimes server administrators prevent this changing of available memory on the fly.

64bit operating systems need nearly 2x as much memory compared to 32bit systems. Some large servers are using 1G max in some scripts.

Show
Petr Škoda (skodak) added a comment - yes, moodle needs more memory with each release Moodle is designed to change max available memory value automatically, sometimes we do not raise the value enough, sometimes server administrators prevent this changing of available memory on the fly. 64bit operating systems need nearly 2x as much memory compared to 32bit systems. Some large servers are using 1G max in some scripts.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: