I have a fresh installation of Moodle 3.8, loaded with data from a Moodle 3.4 installation for an upgrade. The target is Moodle 3.10, but of course I can't do that from 3.4.
After going through the upgrade process, I make it all the way to /admin/upgradesettings.php. Then, when I load any Moodle page, my httpd service immediately starts using 100% CPU. After about 5 minutes I get an HTTP error 500, and these two entries in my error log:
[php7:error] [pid 4036] [client ::1:49709] PHP Fatal error: Allowed memory size of 16777216000 bytes exhausted (tried to allocate 262144 bytes) in /Users/anton/Development/moodle/site/lib/accesslib.php on line 5261
[php7:error] [pid 4036] [client ::1:49709] PHP Fatal error: Allowed memory size of 16777216000 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0
I have:
- Changed my php.ini memory_limit to 16000M.
- Enabled Zend OPcache, using the Moodle recommended settings.
- Cleared the cache and localcache folders in moodledata.
- Set the value of all flags in the mdl_cache_flags table to 0.
I have tried Moodle 3.7 as well, and the problem is exactly the same. The offending line in accesslib.php is the first one here, which leads me to believe it's related to the cache:
if ($context = context::cache_get_by_id($id)) {
return $context;
}
Is there any way to deactivate the cache without access to the admin pages? Any other suggestions to try?
EDIT:
This could also be related to zipping or unzipping something. Is there a way to specify the location of my zip binary directly in the database, to ensure PHP isn't used to do this?