ocsinventoryng
ocsinventoryng copied to clipboard
· The server runs out of memory when importing equipment
- plugin. 1.5.4
- GLPI. 9.3.1 Server Apache 2.4.23 PHP: 7.0.7 memory limit 2128M Synchronize computers already imported I can not synchronize all at once. The first page does not usually synchronize any. Only from the following pages and sometimes one by one. Error in the Apache log: [Wed Sep 26 12:56:34.587471 2018] [:error] [pid 9697] [client 192.168.5.10:36378] PHP Fatal error: Allowed memory size of 2231369728 bytes exhausted (tried to all ocate 20480 bytes) in /srv/www/htdocs/glpi/inc/dbmysql.class.php on line 853, referer: http://192.168.65.24/glpi/plugins/ocsinventoryng/front/ocsng.sync.php [Wed Sep 26 12:56:34.612055 2018] [:error] [pid 9697] [client 192.168.5.10:36378] PHP Fatal error: Allowed memory size of 2231369728 bytes exhausted (tried to all ocate 933888 bytes) in Unknown on line 0, referer: http://192.168.5.24/glpi/plugins/ocsinventoryng/front/ocsng.sync.php [Wed Sep 26 13:07:52.270189 2018] [:error] [pid 12108] [client 192.168.5.10:36632] PHP Warning: vsprintf(): Too few arguments in /usr/share/ocsinventory-reports/o csreports/require/function_commun.php on line 74, referer: http://192.168.65.24/glpi/plugins/ocsinventoryng/front/ocsserver.form.php?id=1 [Wed Sep 26 13:07:52.270249 2018] [:error] [pid 12108] [client 192.168.65.10:36632] PHP Warning: mysqli_query(): Empty query in /usr/share/ocsinventory-reports/ocs reports/require/function_commun.php on line 103, referer: http://192.168.65.24/glpi/plugins/ocsinventoryng/front/ocsserver.form.php?id=1 [Wed Sep 26 13:09:17.303842 2018] [:error] [pid 13250] [client 192.168.5.10:36664] PHP Warning: vsprintf(): Too few arguments in /usr/share/ocsinventory-reports/o csreports/require/function_commun.php on line 74, referer: http://192.168.5.24/glpi/plugins/ocsinventoryng/front/ocsserver.form.php?id=1 [Wed Sep 26 13:09:17.303898 2018] [:error] [pid 13250] [client 192.168.5.10:36664] PHP Warning: mysqli_query(): Empty query in /usr/share/ocsinventory-reports/ocs reports/require/function_commun.php on line 103, referer: http://192.168.5.24/glpi/plugins/ocsinventoryng/front/ocsserver.form.php?id=1
+1 Same behaviour in our setup. Plugin v.1.5.3 worked fine
Found the problem The module "OCS Inventory NG plugins" when everything is activated fails. As soon as I can, I will try with each available option, to see which is
Reviewing the problem in the files run.php and ocsng_fullsync.php have the following instruction: ini_set ("memory_limit", "-1"); ini_set ("max_execution_time", "0"); This is a bad practice since the mysql server takes the values from the php.ini file and since the values of 128M and 30 seconds are already predetermined respectively, it is not necessary that the 2 statements are in the scritp. What I did was comment on them and when running the script, when I reached 128M, the scritp was stopped. I have been able to synchronize by crond up to 50 assets of 3000 that I have inventoried in OCS Inventory. It does not solve the problem that it does not matter everything in a single execution but when putting it in a crond every 5 minutes have been inventoried on average 200 computers per hour.
Regards
Definitely it is the module "OCS Inventory NG " When I'm worse off, it's with the active sections: "Windows Users", "Teamviewer", "Running Process" As I do not use much I have disabled them and the import of equipment no longer gives problems. Regards