[AppDB] - add cron to purge expired sessions from session_list table

Chris Morgan cmorgan at alum.wpi.edu
Sat Jul 8 00:25:52 CDT 2006


For some reason php isn't calling the garbage collection function in 
include/session.php.  Until we figure out what the problem is this cron task 
will remove all sessions older than SESSION_DAYS_TO_EXPIRE in 
include/session.php

I manually cleaned up the session_list table.  It had 4+ million rows taking 
up over 1GB of disk space with sessions running back to late 2005.  It took 
21 minutes just to get the results of 'select count(*) session_list'.

Change session expiration date from 90 to 2 days because we can have 200k 
sessions in 90 days with our current load.  We have nearly 80k sessions in 
that table if we expire all sessions older than 2 days.

I'd be interested if anyone has an idea why include/session.php session::_gc() 
isn't being called as this should take care of keeping the session count 
under control.  I set the cron to cleanup sessions 2 days older than the 
session limit of days so we'll see in the nightly cleanup scripts if the 
_gc() cleanup code isn't being executed properly because the cron will have 
sessions to cleanup.

Chris

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cleanup_session_list.patch
Type: text/x-diff
Size: 3522 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060708/d69a6551/cleanup_session_list-0001.patch


More information about the wine-patches mailing list