[imp] GC on mysql
Marcelo N. Halpern
mhalpern at ramapo.edu
Mon Nov 14 15:15:57 PST 2005
Hi folks,
I'm using MySQL as my session handler backend at the moment. I've recently
discovered that my horde_sessionhandler table grows rather large (10K+ rows).
According to lib/Horde/SessionHandler/mysql.php, is
$maxlifetime = 300 and my $conf['session']['timeout'] = 0 (When the window is
closed). Yet I'm seeing *very* old data:
mysql>select session_lastmodified from horde_sessionhandler where
FROM_UNIXTIME(session_lastmodified) < DATE_SUB(NOW(),INTERVAL 5 MINUTE);
10649 rows in set (0.52 sec)
select session_lastmodified from horde_sessionhandler where
FROM_UNIXTIME(session_lastmodified) < DATE_SUB(NOW(),INTERVAL 60 MINUTE);
9628 rows in set (0.50 sec)
Interestingly enough, there's no session data older than 12 hours and very
little data older than 6 hours.
Since I'm moving to a mysql cluster, I will be running into table size
issues... how can I clean up session data more aggressively? I can always
resort to a cron script that will examine the cookie and delete the session,
but I was hoping for something a bit more... elegant ;-)
This is on Horde 3.0.6 / IMP 4.0.4
Thanks for your help!
Nico
--
Marcelo N. Halpern, your favorite daemon.
UNIX Systems Administrator - Ramapo College
TEL: +1.201.684.6821 FAX: +1.201.684.7961
More information about the imp
mailing list