[ZBX-5584] Zabbix server timing out because of memory exhaustion with PHP -- even with more than 500MB allocated. Created: 2012 Sep 14  Updated: 2017 May 30  Resolved: 2013 May 15

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.0.2
Fix Version/s: None

Type: Incident report Priority: Minor
Reporter: Stephen Wood Assignee: Unassigned
Resolution: Won't fix Votes: 0
Labels: memory, php
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux ubuntu 12.04 lts



 Description   

Actions that require large numbers of host (more than 8 in my experience) timeout now because of PHP script memory exhaustion. I've basically had to crank the PHP memory for scripts setting up to 500mb in order to update more than 10 hosts at a time. I never had to do this with 1.8.

For example, if I try and delete 10 hosts at a time via the server gui I'll be returned to a blank page with no output. The machines won't have been deleted.

In the Apache2 error logs I'll see:
[Thu Sep 13 22:55:06 2012] [error] [client 70.99.250.82] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 76 bytes) in /var/www/zabbix/include/classes/debug/CProfiler.php on line 232, referer: http://bigzabbix.seomoz.org/hosts.php?....

I'm not sure what other information I can provide.

The server has 18 gigs of memory total and 7 gigs free at the time of running. In the PHP./etc/php5/apache2/php.ini file I have:
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 512M

That seems to me an absurd number. Our current host count in Zabbix is about 700.



 Comments   
Comment by Alexey Fukalov [ 2012 Sep 14 ]

Is debug mode enabled for user? If yes, could you try to perform same action with debug mode disabled.

(Debug mode can be changed in Administration->User groups)

Comment by Stephen Wood [ 2012 Sep 14 ]

Thank you. Turning off debug mode seems to have fixed the problem and greatly reduced the memory footprint. I'm not sure why debug mode was turned on by default for the groups I created.

Comment by dimir [ 2013 May 15 ]

Setting Unassigned.

Generated at Thu Apr 18 16:18:32 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.