quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barry Pearce <barry.pea...@copyrightwitness.net>
Subject Re: [mod_python] Sessions performance and some numbers
Date Sat, 09 Apr 2005 10:56:04 GMT

> One small question, as I don't think I understand this completely. In 
> the case of FileSession semaphores become used only with the lock calls 
> enabled, not without them, right? And in the worst case, if the locks 
> where there they would create a semaphore per session until the cleanup 
> function gets called and deletes them? Does it works likes this?

The offshoot conversation on locking which I caused probably isnt helpful...

The underlying code use mutexes anyway - or a lockfile and as long as 
apache is running it will clean up.  So yes it does work as you said.

When I implemented my sessions I wanted control over the session id and 
under no circumstances wanted to use a cookie - I use pure server side 
sessions - which cause more hassle, and given that at the time I was not 
familiar with the _apache stuff in mod_python and therefore produced a 
different locking system for my own file bases sessions.

WRT the FileSession class its best to use the locking as provided by the 
_apache stuff - as Grisha says it does a great job.

All that needs to be ensured is that locks are of request duration and 
not session duration.

Sorry for muddying the waters!


View raw message