I'm trying to find the source of what may well be a memory leak for a moodle script (php fatal error memory exhaustion (currently set to 512mb)) and was looking for advice on best strategies to find the moodle script that is leaking.
The php fatal error log starts with one (and a few typically follow immediately) particular script 3/4 times (cache\stores\static\lib.php on line 261), 1/4 of the time a couple other scripts start though(lib\classes\component.php on line 1040 , lib\dml\moodle_database.php on line 921) . I am wondering if there are scripts upstream causing the problem and I only see scripts affected by the leaking scripts.
I tried manually reviewing error logs upstream of the fatal error but haven't found any culprit yet.
Does anyone have a better strategy to find php memory leaks in moodle?
I'm reluctant to raise the php_memory limit from 512, do any other moodle admins set this value higher (ie 1GB)? Can courses 1-2GB potentially require a lot of memory to justify the increase?
windows 2008r2/php71/moodle3.3.6+, windows 2008r2/MySQL ,