-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
3.11.7
-
None
-
MOODLE_311_STABLE
The error is either a server 500 or a "Fatal error: Allowed memory size of XXX bytes exhausted (tried to allocate XXX bytes) in ..." depending on your setup.
Steps to reproduce:
- Set a reasonable memory limit in php.ini
- Make a course with an Assign activity
- Enroll +130k users into the course
- View the Assign activity as a manager
The issue will happen both on the default view page when constructing the grade summary, and on the "View all submissions" report.
The culprit is the list_participants() method $this->participants member, and it's uses thereof. It acquires the full records for each user, processes them in PHP, and stores them in memory for further processing. In many cases, all that was needed was a count of records, or a list of user IDs.
130k users might seem like an extreme, but we have a number of real-world use-cases for that scenario.
- has been marked as being related by
-
MDL-71433 Having trouble performing certain actions with courses with more than 65,000 participants.
- Open