Forum: Ruby on Rails Please: Desperately Seeking Session expiration (DRbStore)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2ba0ca567353a0b1c28cfc0b5b341ef2?d=identicon&s=25 Michael Kastner (Guest)
on 2006-03-22 12:17
(Received via mailing list)
Hello,

this is killing me: i can't find a way to let idle sessions expire after
a
certain period of time. If they don't expire, they will pile up until
there's no
more memory available.

Please, can anybody give me a hint?

Basically, all I need is a hash or list with all the sessions in
DRbStore.

Greetings

Michael Kastner
1e90246fc67e699c32e59db89d4ff5c3?d=identicon&s=25 Michael Kaiser (Guest)
on 2006-03-22 12:55
(Received via mailing list)
Hey,

Michael Kastner wrote:
> this is killing me: i can't find a way to let idle sessions expire after
> a certain period of time. If they don't expire, they will pile up until
> there's no more memory available.
>
> Please, can anybody give me a hint?
>
> Basically, all I need is a hash or list with all the sessions in DRbStore.

http://rafb.net/paste/results/QAGuP636.html

This is a quick hack based on the DRb-Server that is shipping with
Rails. It keeps track of sessions access times and the clear_sessions
method removes idle session. You have to find a place where to call this
method from of course, maybe you could call it on every n-th session
access or you could call it externally at given intervals.

How do you other people on the list handle session expiration when using
memcached or DRb as session storage?

Michael
This topic is locked and can not be replied to.