Purging old sessions in CGI::SESSSION

From: Bernard Cosell (bernie_at_rev.net)
Date: 11/18/04


Date: Thu, 18 Nov 2004 14:52:51 -0500

Is there some standard way to get rid of old sessions in
CGI::Sessions? I don't have a problem with them being "reused" [and
indeed, they have an expiration time of 1 hour and that seems to work
fine]... but only that the MySQL table I'm using is accuulating a lot
of crap that I'd like to clean out.

Is there some "standard" way, using new CGI::Session
("driver:MySQL",.....) ; to purge out the old/expired sessions? This
on a unix system, so I guess I could set up a cron job and use
expire() and delete() to clean things up [that is, hoping that
'delete' will actually remove the sessions's row from the MySQL
table..:o)], but I was surprised, I guess, not to see this aspect of
CGI::Session addressed...

  Thanks!
    /Bernie\



Relevant Pages

  • Re: Internet Explorer has been hijacked by "About:Blank"
    ... > programmer who wrote it should have his (sorry about gender discrimination ... Keep your modem off when you startup ... Kill Iexplore.exe sessions that come up in the process ... > To get rid of it I ran CWshredder.exe, which seemed to get rid of it, but ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Internet Explorer has been hijacked by "About:Blank"
    ... programmer who wrote it should have his (sorry about gender discrimination ... To get rid of it I ran CWshredder.exe, which seemed to get rid of it, but as ... Iexplore.exe every time at startup as well as occaisonal extra IE sessions ... I have Norton 2003. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Tomcat sessions memory usage and MySQL connections
    ... experiencing freezing of the web server (java or mysql processes take ... now mysql seems to have too many connections all the time. ... On the other side, tomcat seems to have a lot of unused sessions open, ...
    (comp.lang.java.programmer)
  • Re: [PHP] Sessions.. (Im learning), cant call a variable?
    ... > I'm just learning sessions... ... > And I'm trying to add a session variable to a MySQL database. ... > The information contained in this e-mail message is intended only for ... > If the reader of this message is not the intended recipient or an agent ...
    (php.general)
  • Re: Performance: MySQL, session,etc (Was Re: PHP sessions starting to fail)
    ... Thanks - looking into the MySQL config tonight..... ... >>> sessions daily, and at times i have seen 500 sessions open in the ... What you should be looking at is the load, ... > number of httpd processes and number of mysql processes. ...
    (comp.lang.php)