[horde] Cleaning up mysql sessions?

Andrew Morgan morgan at orst.edu
Mon May 14 17:39:19 UTC 2007

On Mon, 14 May 2007, Derek Harkness wrote:

> Is there a process for cleaning old sessions out of the mysql sessionhandler 
> table?  My sessions table is currently about 25 gigs and is really slowing 
> the system down, but I haven't been able to determine what sessions are old 
> and can be deleted.

These are automatically cleaned out based on your php.ini settings for 
session garbage collection.  Here is what I have set:

session.gc_probability = 1
session.gc_divisor     = 100
session.gc_maxlifetime = 1800

I'm using a 30 minute timeout (1800 seconds).  If you can't restart your 
webserver to implement these changes, you could simply delete any rows 
with a session_lastmodified column older than X seconds.


More information about the horde mailing list