#5254 - PHP memory issues via comcode_renderer.php
| Identifier | #5254 |
|---|---|
| Issue type | Minor issue (breaks specific functionality) |
| Title | PHP memory issues via comcode_renderer.php |
| Status | Completed |
| Handling member | Chris Graham |
| Addon | General / Uncategorised |
| Description | [23-Jan-2023 17:49:47 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 761856 bytes) in /home/patricks/git/composr/sources/tempcode.php(2041) : eval()'d code on line 1
[23-Jan-2023 17:49:47 UTC] PHP Error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 761856 bytes) in sources/tempcode.php(2041) : eval()'d code on line 1 @ http://localhost/composr/adminzone/index.php?page=admin-stats&keep_devtest=1 [23-Jan-2023 17:49:47 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 32768 bytes) in /home/patricks/git/composr/sources/comcode_renderer.php on line 2012 [23-Jan-2023 17:49:47 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 65536 bytes) in Unknown on line 0 |
| Steps to reproduce | |
| Additional information | Randomly happens on the admin-stats page and the admin dashboard. Note I have static cache on for 180 hours.
Also, Google Analytics is enabled. |
| Funded? | No |
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".
Comments
block: main_staff_checklist (7 MB used, now at 22,872,864)
block: menu (34 MB used, now at 60,744,016)
The issue is prompted by this in the test code:
// We need to be compatible with low memory limits
if (memory_get_usage() < 30/*a little give*/ * 1024 * 1024) { // If not already in a high-memory (raised-memory) test set
@ini_set('memory_limit', '32M');
set_value('memory_limit', '32M');
}
Which is cleaned up at the end of the test code:
delete_value('memory_limit');
But if it crashes part way, the lowered setting is left there.
I want us to pass all automated and testing in a 32MB memory limit still, so I will see if I can optimise this.
main_staff_checklist: 4MB
menu: 18MB