[Seaside] Session expiration notification

Avi Bryant avi at beta4.com
Sun Oct 3 20:49:32 CEST 2004


On Sep 27, 2004, at 7:39 PM, Pablo Iaria wrote:

> Yeah, I noticed that since y put a line "Transcript show:' 
> unregistered!'"
> in the #unregistered method and I never saw it.
>
> But on the other hand in the GOODS server console y got:
>
> 13:36.00 27-SEP-2004: Connection with 'squeakFB8CBC' is lost: An 
> existing
> connection was forcibly closed by the remote host.
>
> When I closed the connection manually I got:
>
> 14:33.38 27-SEP-2004: Disconnect 'squeakFB8CBC'
>
> So I'm not sure if #unregistered is in fact being called.

One of the things I added in the recent 2.5b5 release was an ExpiryTest 
application which let me do some ad-hoc testing of the expiration and 
unregistration mechanism.  As far as I can tell, things are actually 
working, although it's fairly erratic when exactly #unregistered will 
get sent - usually quite a while after the session actually expires, 
since the cleanup is only triggered by (on average) every 10th new 
session creation.

If you want to play with this yourself, execute "WAExpiryTest install" 
and then go to /seaside/expiry .  Hopefully the links/stats are fairly 
self explanatory.

I think what I will probably do is start a background process that does 
the cleanup every few minutes, instead.  The only small concern I have 
about this is that it's one more thing to break - you might not notice 
that the cleanup process had died somehow, and end up with a lot of 
expired sessions sitting around in memory.  The way it is now, it's 
tied directly to the web server process, and if that goes down you'll 
hear about it :).

Avi



More information about the Seaside mailing list