cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Berens" <>
Subject Memory remains claimed after continuation expiration
Date Thu, 24 Aug 2006 12:52:39 GMT
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 that makes the sendPageAndWait
return. It appears that the memory remains claimed as well. 

Rob Berens
Osirion B.V.
View raw message