[ZBX-5587] PHP Fatal error: Out of memory (allocated 4255383552) (tried to allocate 177121625 bytes) in /srv/www/htdocs/include/classes/debug/CProfiler.php on line 164 Created: 2012 Sep 14  Updated: 2017 May 30  Resolved: 2012 Sep 16

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

Type: Incident report Priority: Blocker
Reporter: Alf Solli Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: frontend, memoryleak, php
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

SUSE Enterprise 11, SP2 x64, 7GB RAM, PHP 5.2 (also tested with 5.3 on OpenSUSE 12.1 )


Attachments: File IT-Services-fai.-with-huge-memory-usage.html.bz2     File report5.php.htm.bz2    
Issue Links:
Duplicate
duplicates ZBX-5148 server creates extra and wrong mappin... Closed
duplicates ZBX-5218 Editing trigger prototype expression ... Closed

 Description   

When trying to monitor IT Services (click monitoring -> IT Services), the page just hangs, and eventually dies with the error message in the summary in apache logs. Increasing memory to 7GB for PHP "solves" the problem, but eats up 2,4GB memory and is slow as molasses.

I've managed to capture a debug of a successful load of the page : http://www.linuxgeekz.net/IT-Services-fai.-with-huge-memory-usage.html.bz2
(It'll expand to a 169MB html file with 2,2 million keys )

My environment has 710 / 20 / 43 devices monitored, 30895 / 163681 / 54 items, and 1862 / 1019 [15 / 0 / 1847 triggers.
At the moment only 88 nvps and the servers are under otherwise very low load.

Before I started increasing PHP memory limits, this was the most common error in apache:
PHP Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 71 bytes) in /srv/www/htdocs/include/func.inc.php on line 1350, referer: http://zabbix.itmng.no/dashboard.php?ddreset=1&sid=413c78b1fd1c2a0dss



 Comments   
Comment by Alf Solli [ 2012 Sep 14 ]

Also worth noting is that I have absolutely no IT services defined yet. Tried earlier to add one service with 6-7 children, but they where removed as part of the test.

Please let me know if I can provide any more info or help in any other way.

Comment by Alf Solli [ 2012 Sep 14 ]

<Richlv> alfsolli, did it run out of memory also with debug disabled ?
<alfsolli> Richlv, Yes.
<Richlv> mention that in the issue, if you didn't already
<alfsolli> I had the limit at 2GB before enabling debug. All gone

Comment by Alf Solli [ 2012 Sep 14 ]

Appeared here as well; Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 128 bytes) in /srv/www/htdocs/test/include/classes/helpers/CHtml.php on line 48 (this was before enabling debug, and at php limit raised from 1500M to 2048M )

Comment by Alf Solli [ 2012 Sep 15 ]

This may be related or help discover the root cause. This is just a MySQL error (generated from the frontend) when trying to get a top 100 most busy triggers report. (see report5 file attached)

Comment by Alf Solli [ 2012 Sep 16 ]

Seems the root cause of this issue was due to ZBX-5148 and ZBX-5218, making ALOT of orphaned triggers.

We started with 2.0.0, and didn't realize we were affected by this until now, so all is fixed and this report is not valid.

Thanks for Zalex for pointing it out.

Generated at Fri Apr 26 09:37:23 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.