fogcontroller.class.php on line 260 : Allowed memory size of 3145728000 bytes exhausted
-
Is there a particular page that you’re going to when you receive this error?
I’m just going to guess here, but you’re going to a host to edit, and when you select that host, this is when you’re seeing the error? Or you’re going through reports and seeing the error? Just guessing here.
-
I have several different errors.
1 Dashboard
[Tue Jun 12 09:18:40.964761 2018] [proxy_fcgi:error] [pid 9105] [client 10.2.3.11:33038] AH01071: Got error 'PHP message: PHP Notice: A non well formed numeric value encountered in /var/www/html/fog/status/bandwidth.php on line 109\nPHP message: PHP Notice: A non well formed numeric value encountered in /var/www/html/fog/status/bandwidth.php on line 109\nPHP message: PHP Notice: A non well formed numeric value encountered in /var/www/html/fog/status/bandwidth.php on line 110\nPHP message: PHP Notice: A non well formed numeric value encountered in /var/www/html/fog/status/bandwidth.php on line 110\n'
2 FOG Version Information and login page
3 Host -> List All Hosts -> Select host
[Tue Jun 12 09:44:25.520305 2018] [proxy_fcgi:error] [pid 9882] [client 10.1.65.176:40332] AH01071: Got error 'PHP message: PHP Fatal error: Allowed memory size of 3145728000 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/fog/lib/fog/fogcontroller.class.php on line 260\n', referer: http://fog.insa-rennes.fr/fog/management/index.php?node=host&sub=edit&id=1137
4 ???
[Tue Jun 12 09:45:15.182778 2018] [proxy_fcgi:error] [pid 9105] [client 10.3.1.243:53492] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Exception: Error multiple hosts returned for list of mac addresses in /var/www/html/fog/lib/fog/hostmanager.class.php:209\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogbase.class.php(571): HostManager->getHostByMacAddresses(Array)\n#1 /var/www/html/fog/lib/client/registerclient.class.php(46): FOGBase::getHostItem(true, false, false, true)\n#2 /var/www/html/fog/lib/fog/fogpage.class.php(3013): RegisterClient->json()\n#3 /var/www/html/fog/lib/fog/fogpage.class.php(249): FOGPage->requestClientInfo()\n#4 /var/www/html/fog/lib/pages/processlogin.class.php(57): FOGPage->__construct('')\n#5 /var/www/html/fog/lib/fog/fogpagemanager.class.php(381): ProcessLogin->__construct()\n#6 [internal function]: FOGPageManager->{closure}('/var/www/html/f...')\n#7 /var/www/html/fog/lib/fog/fogpagemanager.class.php(386): array_map(Object(Closure), Array)\n#8 /var/www/html/fog/lib/fog/fogpagemanager.class.php(79): FOGPageManager->loadPageClasses()\n#9 [internal function]: FOGPageManager->__construct...\n'
mysql> select count(*) from hostMAC GROUP by hmMAC HAVING COUNT(*) > 1 order by hmHostID; Empty set (0,00 sec)
I tried to determine as precisely as possible the errors
-
@fredg You seem to have made some modifications as you are running a reverse proxy Nginx.
Still, it’s Apache/PHP-FPM timing out on the FOG Version info page (although the proxy settings in Nginx could be related to this as well!!)
Memory exhaustion is definitely Apache/PHP-FPM related.
Can you navigate to a host edit page where memory exhaustion happens and then take a look at the top program in terminal. Press shift+m to sort on memory usage, take note of the ones at the top and how much they’re using.
-
@quazz said in fogcontroller.class.php on line 260 : Allowed memory size of 3145728000 bytes exhausted:
you are running a reverse proxy Nginx
If I had to guess (unless the OP is doing something strange) that ngix might be the FOG servers. I believe that is where the FOG management gui reaches out to the FOG Project servers to get the information, both on the login and configuration pages.
The memory exhaustion issue could be php-fpm but that issue should have been fixed with FOG 1.5.4. We can test if it is php-fpm by turning it off in the configuration file to see if the memory error is coming from there. I can see issue #1 could be related to the tighter (more exact) restrictions on php code than apache php.
-
Error 2 : solved
Error 3 : Here is the capture of the top when editing a host
There is no memory overflow
-
a2disconf php7.1-fpm systemctl reload apache2 [Wed Jun 13 15:03:50.180784 2018] [proxy_fcgi:error] [pid 30996] [client 10.1.65.176:41740] AH01071: Got error 'PHP message: PHP Fatal error: Allowed memory size of 3145728000 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/fog/lib/fog/fogcontroller.class.php on line 260\n', referer: http://fog.insa-rennes.fr/fog/management/index.php?node=host&sub=edit&id=45
-
@fredg said in fogcontroller.class.php on line 260 : Allowed memory size of 3145728000 bytes exhausted:
3145728000 bytes
That’s 3GB if I’m not mistaken. I’m not sure why it decides to use so much memory for a host page in certain cases, seems like a bug perhaps.
@Tom-Elliott any ideas on this?
-
@quazz my best guess? Imaging history, snapin history, and (most likely) user tracking.
-
@tom-elliott :
No virus history
One Imaging History
Five Login history (a login for each date)
No Snapins -
Report Management -> User tracking -> Search for same host => error (white page)
[Thu Jun 14 08:48:36.951824 2018] [proxy_fcgi:error] [pid 78806] [client 10.1.65.176:40664] AH01071: Got error 'PHP message: PHP Fatal error: Allowed memory size of 3145728000 bytes exhausted (tried to allocate 36864 bytes) in /var/www/html/fog/lib/fog/fogcontroller.class.php on line 260\n', referer: http://fog.insa-rennes.fr/fog/management/index.php?node=report&sub=file&f=dXNlciB0cmFja2luZw==
-
mysql> select * from userTracking where utHostID=1312; +-------+----------+------------+----------+---------------------+--------+------------+---------+ | utID | utHostID | utUserName | utAction | utDateTime | utDesc | utDate | utAnon3 | +-------+----------+------------+----------+---------------------+--------+------------+---------+ | 5583 | 1312 | rechit | 0 | 2018-04-03 16:50:44 | | 2018-04-03 | | | 19841 | 1312 | rechit | 1 | 2018-04-18 10:57:47 | | 2018-04-18 | | | 26357 | 1312 | rechit | 1 | 2018-04-25 09:41:23 | | 2018-04-25 | | | 33295 | 1312 | rechit | 1 | 2018-05-16 08:40:23 | | 2018-05-16 | | | 43095 | 1312 | rechit | 0 | 2018-05-28 14:19:27 | | 2018-05-28 | | | 43111 | 1312 | rechit | 1 | 2018-05-28 14:32:43 | | 2018-05-28 | | +-------+----------+------------+----------+---------------------+--------+------------+---------+ 6 rows in set (0,00 sec) mysql> select count(*) from userTracking; +----------+ | count(*) | +----------+ | 53885 | +----------+ 1 row in set (0,00 sec)