PHP Fatal error: Allowed memory size exhausted in /usr/local/www/guiconfig.inc
-
Hi Folks,
For the last 3-4 days I am getting the following error:
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 94489533217 bytes) in /usr/local/www/guiconfig.inc on line 954
The GUI remains functional but these errors are at a minimum annoying and I am concerned that there may be a larger issue.
System info:
23.01-RELEASE (amd64)
Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz
4 CPUs : 1 package(s) x 2 core(s) x 2 hardware threads
8GB RAM
AES-NI CPU Crypto: Yes (active)All recommended patches installed. Only using IPv4.
Services running:
- dhcpd
- dpinger
- miniupnpd
- openvpn
- pfb_filter
- pimd
- unbound
-
That is this:
$content .= '<h5>'. htmlspecialchars($alias['url']) .'</h5><ul><li>'. implode('</li><li>', $alias_addresses) .'</li></ul>';
Are you loading some massively large alias? The PHP memory limit is set at 512 MB for non-ARM CPUs. You would seem to be 94 GB short, there. Can you break the alias up into multiple parts? Like, if you trying to load "all countries" make it a dozen smaller aliases and rules? But even that is not 94 GB. Perhaps some sort of error in the config file?
-
@steveits I only have 18 total aliases. The largest have only 8 values...
-
@nfld_republic are they nested in a circular fashion maybe?
-
@steveits No. They very simple with nesting.
Nothing has changed for some time before the issue started a few days ago.
-
@nfld_republic What are you doing when you see the message?
-
@steveits I am just in the dashboard. Sometimes I get the error when just looking at the screen - maybe it is the autoupdate?
-
@nfld_republic I assume you meant, "without nesting," above. It kinda seems like it has to be the
implode('</li><li>', $alias_addresses)
code as that expands the entries into a string. Probably something on the dashboard is trying to show the alias and it's just looping forever. Possibly it's running in the background for a long time before you see the error? Not sure... I'd look for something in Diagnostics/Backup & Restore/Config History that changed. -
@steveits The problem seems to have been resolved but I am not sure why. I moved around and reconfigured a few of the widgets and rebooted late last night. (I swear it is harder to get "change management" approval at home than in an organisation of 7500 people ) I no longer get the error.
Thus, it could have been (a) by moving around the widgets it "fixed" a corrupted configuration; or (b) there was something hanging around in memory/cached/etc. that rebooting cleared out.