-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
3.11.2
-
None
-
MOODLE_311_STABLE
The function user_profile_social_update_module_availability is called from an upgrade step. This includes this line:
$modules = $DB->get_records('course_modules');
If you have a large number of entries in the course_modules table, this is likely to use all your memory because:
- It loads all the records even though it only needs the ones with availability field set
- It reads all the records into memory at once (should use get_recordset which loads them in batches of 100,000 or so)
- It loads all the fields of the records even though it actually only needs the id and availability fields
- duplicates
-
MDL-72025 Memory error during 3.11 upgrade - user_profile_social_update_module_availability()
-
- Closed
-