DWR

Memory leaks

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 2.0.1
  • Fix Version/s: 2.0.4
  • Component/s: Engine
  • Description:
    Hide
    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

    Show
    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

Issue Links

Activity

Joe Walker made changes - 08/Feb/08 4:24 AM
Field Original Value New Value
Fix Version/s 3.0.M1 [ 10042 ]
Joe Walker made changes - 12/Feb/08 2:31 PM
Link This issue duplicates DWR-146 [ DWR-146 ]
Joe Walker made changes - 12/Feb/08 2:32 PM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Duplicate [ 3 ]
Mike Wilson made changes - 06/Mar/08 10:27 AM
Fix Version/s 2.0.4 [ 10060 ]
Fix Version/s 3.0.M1 [ 10042 ]
Assignee Joe Walker [ joe ] Mike Wilson [ mikewse ]
Mike Wilson made changes - 06/Mar/08 10:28 AM
Link This issue duplicates DWR-231 [ DWR-231 ]

People

Dates

  • Created:
    24/Aug/07 4:22 PM
    Updated:
    06/Mar/08 10:28 AM
    Resolved:
    12/Feb/08 2:32 PM