cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christofer Dutz" <d...@c-ware.de>
Subject AW: Memory remains claimed after continuation expiration
Date Fri, 25 Aug 2006 08:20:04 GMT
Hi Rob,

 

There is a monitor utility shipped with almost every VM. This can show you
the exact memory-usage. On one of the tabs there is a button to manually
trigger a big garbage-collection. I would guess that you are having the same
problems we were having some months ago. If this is the case, the Cocoon is
freeing the memory correctly. Unfortunately the algorithm detecting free
memory portions doesn't recognize all free memory-areas and herby dos not
free them. You will have to manually reconfigure the default GC settings of
the VM. I have no experience of which flags result in the memory-leaks from
disappearing, since I simply switched to another VM configured with better
default GC setting ;) . yeeeah . have to admit, that I sometimes am really
lazy ;)

 

Hope I could help,

   Chris

 

  _____  

Von: Rob Berens [mailto:rberens@osirion.nl] 
Gesendet: Freitag, 25. August 2006 08:12
An: users@cocoon.apache.org
Betreff: Memory remains claimed after continuation expiration

 

THIS MESSAGE WAS PREVIOUSLY POSTED TO THE DEVELOPERS LISTED ON 2006-08-24

 

I'm using cocoon 2.1.8 and noticed that in some cases memory remains claimed
even after continuations have expired.

 

Essentially the case is as follows:

 

For test purposes I switched to a very low time-to-live for continuations:
30 seconds with an expiration check by the continuations manager every 30
seconds with an offset of 30 seconds.

Session time out is 1 hour.

So sessions live substantially longer than continuations.

My webapp uses sessions.

 

Consider the following js:

 

function myPage() {

    var big = new VeryBigObject();

    cocoon.sendPage("bigobjectPage.html", {big: big)};

}

 

When calling this page many times one sees that memory is claimed for the
big object and that it is released properly. I observed this by using the
-verbose:gc flag on the VM.

 

Now change to this (sendPageAndWait i.s.o. sendPage):

 

function myPage() {

    var big = new VeryBigObject();

    cocoon.sendPageAndWait("bigobjectPage.html", {big: big)};

    // handle user response

}

 

Call this page once again and then have the user click away i.e. the
sendPageAndWait does not return.

Then after a while the contination expires and is neatly removed, but the
memory for the big object appears to be claimed.

Executing this function several times in the end leads to an out of memory
error, even when previous continuations have expired.

 

Am I doing something wrong or is this a bug?

 

Later I also tried what happened when the user actually performs an action
that makes the sendPageAndWait return. It appears that the memory remains
claimed as well. 

 

Rob Berens

Osirion B.V.


Mime
View raw message