perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keith Watanabe <>
Subject Re: session records bulding up
Date Mon, 13 Jan 2003 20:20:20 GMT
<blockquote type=cite class=cite cite><font size=2>The questions: Who
handles the cleanup of that table, and if I have to do it by hand, how do
I select the records that I may safely remove?</font></blockquote><br>
Here's a page that describes how sessions in embperl are being
<a href="" eudora="autourl"></a><br><br>
I think though, from the looks of the documentation, you have to manage
the lifespan of the sessions on the server side yourself (anyone who
knows otherwise, please correct me if i'm wrong).<br><br>
The main issue is that the way Apache::Session requires sessions in the
database, it has no timestamp so you can't easily run a cronjob that
blows the old sessions away (where if you used a flat file mechanism you
could).&nbsp; Maybe for now you should switch your persistence mechanism
to a flat file and then run a cronjob that nukes the session files that
are stale.<br><br>
The only other thing i can think of is to create a secondary session
table where you take the session id and insert that into another table
with the timestamp.&nbsp; Then later when the session grows stale, you
nuke both sessions.&nbsp; It's nasty but I don't see any easy way around
this issue.<br><br>
One more way which is probably evil but better overall, imo, is to add a
field to the session table with the timestamp and then edit the
Apache::Session module that handles Mysql persistence, so that you can
insert a timestamp.&nbsp; I think if you were able to use postgres you
might be able to use a trigger so that anytime there's an insert or
update, you could update the timestamp as well, but that's off

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message