[Seaside-dev] Handling of session expiration
Esteban A. Maringolo
emaringolo at gmail.com
Thu Nov 8 13:45:28 UTC 2007
On Nov 7, 2007 1:24 PM, Lukas Renggli <renggli at gmail.com> wrote:
> > If I place a background process cleaning all the handlers every 30
> > seconds, the image runs very well, with no unnecesary continuations,
> > nor nothing undesired.
> > [[Processor sleep: 30000. WARegistry clearAllHandlers. true ] repeat]
> > forkAt: Processor userBackgroundPriority .
> You will also loose all your active sessions every 30 seconds. Most
> certainly you don't want this.
You're right, I don't want this, I just added it for testing purposes,
because if the handlers are not cleared, the image gets collapsed, and
completely unresponsive (sometimes it crashes).
Leaving a lot of dead processes. In Dolphin instances of Continuation
holds a process, so if the continuation is not claimed back, the
process isn't neither. Inspecting references to those processes, I
find these processes being referenced by continuations, which in turn
are the escapeContinuation of a WASession.
> > How do you handle the "cleaning" of undesired/expired
> > WARequestHandler's? (and all of its subclasses).
> Seaside clears up old sessions every now and then wenn a new session
> is created. Have a look at #shouldCollectHandlers and friends. This is
> also the reason why sessions do not just disappear if not used. You
> will always have a couple of sessions and associated objects lingering
> around, even if none of them are active at the moment.
But even sending #unregistered to all the instances of WASession, the
handlers of callbacks and are not unregistered.
By now the only way I have to clear those dead processes is by using
the brute WARegistry class>>#clearAllHandlers, which for development
purposes cleans the image, but it's not suitable for production.
> > I've run the same test against Seaside on Squeak, and evaluating
> > "Continuation allSubinstances" answer a very large list of instances
> > too, so I believe this issue is not Dolphin-only.
> Usually this is not a problem.
No... in Squeak its not a problem, because the instvar 'values' of
Continuation instances doesn't hold a process as is in Dolphin, so
having continuations instances waiting to be GCed its not a problem,
but in Dolphin it is when the number of processes is so big (almost
1:1 on continuation instances).
However, I'm trying to fully understand the callback/handlers
implementation, to see how can I find a solution for this.
Esteban A. Maringolo
eMaringolo at gmail.com
More information about the seaside-dev