[ZBX-3878] Slide Shows cause the browser to use more and more RAM over time. Created: 2011 Jun 10  Updated: 2020 Jan 19

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

Type: Incident report Priority: Trivial
Reporter: dazman Assignee: Unassigned
Resolution: Unresolved Votes: 19
Labels: memoryleak, slideshows
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Server: CentOS 5.6, Client: Windows, OS X, Browser: Chrome, Firefox, Opera, IE


Attachments: PNG File memleak.png     PNG File opera2.png     PNG File opera_memory.png     PNG File screenshot-1.png     PNG File screenshot-2.png     PNG File screenshot-3.png    
Issue Links:
Duplicate
is duplicated by ZBX-7073 Dashboard widget drag'n'drop breaks a... Closed
is duplicated by ZBX-4062 Slide Show eats Virtual Memory until ... Closed
is duplicated by ZBX-6636 memory leak in browser Closed

 Description   

If a slide show is configured to rotate through many slides, each refresh/rotation takes up more RAM for the browser. Over time, the box/browser will fall over due to low memory.
For example, a screen with 9 graphs on it takes roughly 5MB RAM up on each refresh.

The memory never seems to be given back unless you do a manual refresh of the page. As soon as you do a manual refresh, the browser returns to normal memory usage.

This doesn't seem to affect Screen refreshes, just slide shows.



 Comments   
Comment by Tiago Soares [ 2011 Aug 21 ]

Someone know if this bug affects 1.8.6?

Comment by richlv [ 2011 Aug 21 ]

given that there are no known changes in that area, it most likely does

Comment by Aleksandrs Saveljevs [ 2011 Aug 22 ]

It does. See https://support.zabbix.com/browse/ZBX-3988?focusedCommentId=45879&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-45879 .

Comment by David [ 2012 Feb 17 ]

Still affects 1.8.10. On our system, it crashes several times a day in Firefox 10.0.1.

Comment by Jordi T [ 2012 Jun 29 ]

Indeed, running 1.8.10 here and it crashes quite often. Running the slideshow directly on a Sony Bravia tv which uses Opera (can't find the exact version number).

We're using 3 screens within the slide:
screen 1: 3xtrigger status + 3xgraph
screen 2: systemstatus
screen 3: URL

I would love to see this getting fixed. Right now we need to manually reload the page whenever the out-of-mem error occurs.

Comment by Tom Eicher [ 2013 Jan 17 ]

On our "wall display machine" (Suse 12.2 Laptop), Firefox does not survive the night, Konquerer survives for 2-3 days...

If memory is really free upon a page reload, a fix would be as easy as just redirecting (HTTP 302) to the first slideshow slide after the last slide has been shown...

Comment by Jordi T [ 2013 Jan 17 ]

Yes that will probably work.

We have implemented the following work-around:

@include/page_header.php in the HTML part:

<meta http-equiv="refresh" content="540">

Quite dirty, but for us it has been working great

Comment by Tom Eicher [ 2013 Jan 23 ]

Yeah, that's a bit crude
We put a page on the webserver

<html>
<head>
</head>
<body>
<p>Page refresh in 1sec ....</p>
<script type="text/javascript">
setTimeout(function(){top.location.replace(top.location.pathname);},1000);
</script>
<!-- note the "top.location" not "window.location". needed to break out of iframe! -->
</body>
</html>

and create a "last slide of every show" with the only content of type "URL", pointing to this page, and added to the end of every slideshow...

Actually, the fix for Zabbix itself could look quite similar ("if last slide ...")

Comment by gijs [ 2013 May 29 ]

This "fix" with the refresh page seems to work for me.
i updated from 2.0.2 to 2.0.6 when i got almost the same problem.

Comment by Sander Cornelissen [ 2013 Aug 22 ]

It works, it flushed the memory of the client browser. But it loses the full-screen parameter.I have modifieded it to this:

<html>
<head>
</head>
<body style="background-color: #282828;">
<script type="text/javascript">
var t=function(){
                top.location.replace(top.location.pathname + '?fullscreen=1');
        };
t();
</script>
</body>
</html>
Comment by richlv [ 2013 Sep 02 ]

also reproducible in trunk r38126 with opera 12.16

Comment by Eduards Samersovs (Inactive) [ 2013 Sep 10 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-3878

Comment by Oleg Egorov (Inactive) [ 2013 Sep 12 ]

(1) I have 10 slides with 1-3 graphs
Test browser - IE8

After one circle + 20 - 464 kb of memory usage

Problem exist not only in Monitoring->Screens->Slide shows

If slides without graphs memory usage is stable

<richlv> i'm also seeing increased memory usage with the dev branch. while smaller than before, here's and example of opera memory usage steadily increasing over time.

Eduards RESOLVED r.38634

oleg.egorov

Again in IE8, slides refresh time = 1

Test begin in 11:44
Memory usage: 42763

Test end in 11:46
Memory usage: 105 636

And JS ERROR

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Fri, 20 Sep 2013 08:47:12 UTC


Message: 'objDims' is null or not an object
Line: 2887
Char: 4
Code: 0
URI: http://localhost/ZBX-3878/frontends/php/jsLoader.php?ver=2.1.3&lang=ru_RU&showGuiMessaging=1&files[]=class.pmaster.js&files[]=class.calendar.js&files[]=gtlc.js&files[]=flickerfreescreen.js&files[]=servercheck.js

Eduards RESOLVED r.38664,38676

oleg.egorov CLOSED

Comment by Janis Jansons [ 2013 Sep 13 ]

Looking forward for this fix, as the front-end seems to leak a lot on our monitoring wall using Chromium browser..

Comment by richlv [ 2013 Sep 13 ]

nope, still not good. in this graph, left hand side shows a slideshow being open, right hand side - inventory page (same browser, same zabbix frontend)

Comment by Eduards Samersovs (Inactive) [ 2013 Sep 20 ]

Fixed in versions pre-2.1.4 (trunk) r.38681, pre-2.0.9rc1 (alpha) r.38683

<richlv> this does not match "fix versions" in the issue - "Fix Version/s: 2.0.9rc1, 2.1.5"

Comment by richlv [ 2013 Sep 23 ]

(2) this resulted in a regression : the blocks in the dashboard can not be rearranged anymore. drag a block once, second attempt fails

vitalij_zab it intersects with task ZBX-6911, I fixed this there, and it will be released after testing.

jelisejev This has been fixed for trunk in ZBX-6911, but we need a separate fix for 2.0.

iivs RESOLVED for 2.0 in svn://svn.zabbix.com/branches/dev/ZBX-3878 r38985

jelisejev CLOSED.

Comment by richlv [ 2013 Sep 27 ]

(3) and at least with opera this might have resulted in an insane disk cache usage - ~ 2gb for zabbix alone. would be nice to investigate and find out whether we can make it not count each image as worth caching separately

Comment by richlv [ 2013 Sep 30 ]

trunk r38866.

as discussed, there's still some memleak :

Comment by Gabriele Armao [ 2013 Oct 10 ]

then why reporting it as fixed in 2.0.9 release notes? http://www.zabbix.com/rn2.0.9.php

Comment by richlv [ 2013 Oct 12 ]

partial fix was committed for 2.0.9 (that is, memleak should be smaller, but it's still not gone)

Comment by gijs [ 2013 Dec 12 ]

In 2.0.2 it worked all fine for me.
2.0.6 screwed it all up.
what is changed between those versions, isnt the fix just in the old version already?
the partial fix was no fix at all here. systems run out of memory as fast as before.

Comment by AndreaConsadori [ 2014 Feb 10 ]

on 2.2.1 issue came back

Comment by callistix [ 2014 Nov 14 ]

I confirm that the issue is still there in 2.4.2. It urgently needs a fix because it makes unattended display of slideshows impossible.

Comment by Marco Hofmann [ 2014 Nov 14 ]

We "solved" the problem on our unattended displays with Igel Thin Clients thatreboot every 4 hours... If we don't do this, the Igel will freeze after about 5 hours.

Comment by Aleksandrs Saveljevs [ 2016 May 23 ]

Just a comment regarding a potential direction to dig into. According to http://learn.jquery.com/using-jquery-core/data-methods/ :

"There's often data about an element you want to store with the element. In plain JavaScript, you might do this by adding a property to the DOM element, but you'd have to deal with memory leaks in some browsers."

Could it be that we are storing some JavaScript data in DOM elements?

Comment by Alan Costa de Souza [ 2016 Jul 21 ]

I think the cause of this bug are the constants pages that are added as source and not cleaned.

Generated at Thu Apr 25 13:06:05 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.