[Seaside] How to configure session timeouts (age)
Mariano Martinez Peck
marianopeck at gmail.com
Mon Nov 28 12:16:39 UTC 2016
On Mon, Nov 28, 2016 at 4:13 AM, jtuchel at objektfabrik.de <
jtuchel at objektfabrik.de> wrote:
> I would be interested in your experiences with 5 hours. We went for 40
> minutes in order to give the server a chance to free RAM. Since Seaside by
> default doesn't clean up sessions when they expire, but only when new ones
> are requested, I'd be worried about memory usage with such long session
Indeed, there is usually the tradeoff between larger timeouts and the
memory consumption. In my particular case, the UI of the app allows having
multiple tabs, multiple workspaces, and there are even settings/preferences
and other things that are scoped to session level. In addition, some of the
components are quite complex for the user to get there. That's why they
really appreciate long during sessions. And finally, because there are not
that many users.
Now, to answer your question, I think the answer is that my RAM does not
gets affected much because we are running in GemStone. In GemStone, the
Seaside sessions are not transient (temp) but *persistent* objects. In this
regard, the main memory to consider in GemStone is the Share Page Cache
(the cache of persistent objects on memory). If I got things right, having
long sessions does not affect much. Worst scenario if a have an unused
session is that if another new sessions comes in and I don't have much free
space in the Share Page Cache, then the old "unused" session (at the end
this is like any persistent object) will be moved back to disk to make
room. In other words, I think in the worst scenario this would cause some
trashing (moving objects between SPC an disk).
> Another question: what do maximumRelativeAge and maximumAbsoluteAge
> acrually do? Is this some way of tweaking the session cleanup policy?
I have no clue what those are.
> Am 28.11.16 um 02:09 schrieb Mariano Martinez Peck:
> This is the way I do it and it works for me:
> app cache expiryPolicy configuration
> at: #'cacheTimeout'
> put: 5 hours asSeconds
> That should go in the code you use to register your seaside app (likely
> from a class side #initialize).
> Let me know if that helped.
> On Sat, Nov 26, 2016 at 5:22 PM, Petr Fischer <petr.fischer at me.com> wrote:
>> Hello, when starting my image with Seaside app, I have this code in
>> startup method:
>> WAMySeasideApp>>startUp: resuming
>> WAMySeasideApp waApplication
>> preferenceAt: #maximumRelativeAge
>> put: 18000. "5 hours"
>> WAEFTTasksApp waApplication
>> preferenceAt: #maximumAbsoluteAge
>> put: 86400. "24 hours"
>> ZnZincServerAdaptor startOn: 8080.
>> ^ WAAdmin defaultDispatcher handlerAt: 'my-seaside-app'
>> This "maximum age" session parameters are correctly showing in seaside
>> config web app, but every seaside session is still 30 minutes.
>> What is proper way to configure session timeouts (age), dynamically, via
>> Thanks, pf
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
> seaside mailing listseaside at lists.squeakfoundation.orghttp://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> Objektfabrik Joachim Tuchel mailto:jtuchel at objektfabrik.de <jtuchel at objektfabrik.de>
> Fliederweg 1 http://www.objektfabrik.de
> D-71640 Ludwigsburg http://joachimtuchel.wordpress.com
> Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1
> seaside mailing list
> seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside