[Seaside] Garbage Collection

David Shaffer cdshaffer at acm.org
Wed Jun 8 21:02:57 CEST 2005

Günther Schmidt wrote:

> Hi,
> I've created 4 instances of WAStore in different windows and some with
> the new session button.
> Every minute I do a
>     WAStore allInstances size
> and it answers 4, as expected.
> What I didn't expect was for all of these instance to still be there
> after 15 minutes, I had expected for them to be garbage collected
> after more than 600 seconds had passed.
> How come they didn't clear out of memory?
> I ran this test with store because I have 36 constantly persistent
> instances of another TopFrame component that I wrote myself and
> presumed I had made some mistake that would keep all those instances
> persistent.
> But since even the sample WAStore instances stay persistent
> indefinitely I guess the problem lies elsewhere.
> Günther
> I'm using Seaside on VWNC 7.3
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside


I'm not sure if this is the problem your having but Seaside only checks
for stale sessions during creation of a new session.  So, after the
session timeout create a new session and then the rest will be expired. 
After a garbage collection (manually through the Launcher menu in VW or
after the VM decides to do it itself) you should see the instances go
away.  Keep in mind that there are two things at work here as well:
Seaside deciding to dicard its reference to the session (expire it) and
VW deciding to garbage collect it.  The timing of these is unrelated but
the second won't occur until some time after the first (which occurs on
the first creation of a new session after the expiration of  the session
in question).

I posted a (Squeak only, sorry) class to expire Seaside sessions every
so often.  I find this policy works better than the "expire on creation
of a  new session".  It is simple enough to fork off a block to take
care of this.  Look for my previous e-mails for details.


More information about the Seaside mailing list