Memory leaks

Description

From: dmitry_timin

we're using DWR with Tomcat 5.5 to create a webapp which shows lots of information in realtime. This app is meant to be running for a long time (ideally never to be shutdown). All the data is updated from server side every 2 seconds. Javascript from client side also sends requests to server every minute.
Discovered that after 24 hours IEXPLORE.EXE process takes about 250M of memory and CPU goes to appr. 10-30%.
Looking at DOM model in DOMExplorer I see many
<DIV><IFRAME id=dwr-if-poll-2780>...
<FORM id=dwr-form>..
previous entry is dwr-if-poll-2778 and so on till zero. so it seems that these entries are never released and DOM increases all the time..
After 2 days of working javascript fails to find any DOM elements by ID and nothing works any more.
Another feature - when javascript doesn't send requests to server every minute - everything seems fine. I still have <DIV><IFRAME id=dwr-if-poll-xxx><FORM
id=dwr-form> but only one instance (the last one) and number xxx increases by 1 (it increases by 2 in previous example).
Not sure if it's a bug or I'm doing something wrong..
Java code to update page (every 2 seconds for every control on page):
Util util = new Util(ctx.getScriptSession());
util.addFunctionCall("setValue", id, "" + value);
Javascript code to request server (once every minute):
dwrForm.someAction({
callback:function(dataFromServer) { ... },
timeout:10000,
warningHandler:function(error) { ... },
errorHandler:function(error, exception) { ... }
Thanks!

------- Additional comments from dmitry_timin Tue Aug 14 03:46:22 +0000 2007 -------
page DOM seems to be updated every minute if look at DOMExplorer. if during this minute between updates there were some server calls from Javascript then previous <DIV><IFRAME> and <FORM> elements are not deleted, when no server calls occur previous elements (1 DIV and 1 FORM) are deleted

Activity

Show:
Joe Walker
August 24, 2007, 4:22 PM
Joe Walker
October 11, 2007, 12:42 PM

See also the mailing list thread with:
Subject: [dwr-user] memory leak in Reverse Ajax?

Joe Walker
February 12, 2008, 2:32 PM

See

Mike Wilson
March 6, 2008, 10:26 AM

From the description it sounds like they may have a problem caused by the timeout bug, see https://directwebremoting.atlassian.net/browse/DWR-231.

Assignee

Mike Wilson

Reporter

Joe Walker

Labels

None

Documentation Required

None

Components

Fix versions

Affects versions

Priority

Major
Configure