[rt-users] One Performance problem identified

Mathew Snyder theillien at yahoo.com
Tue Nov 6 18:04:56 EST 2007

The sessions table is a mess (well, *was* a mess).  Why this doesn't get cleaned
out regularly by RT is beyond me.  That said, we had more than 21000 records in
there.  I ran "DELETE * FROM sessions WHERE LastUpdated < (now() - INTERVAL 24
HOUR)" as is laid out in the wiki-page for clearing sessions.  This cleaned out
the table but, it still takes too long to load a ticket.  Looking at the slow
queries log I see

# Time: 071106 17:56:13
# User at Host: rt_user[rt_user] @ localhost []
# Query_time: 14  Lock_time: 0  Rows_sent: 1  Rows_examined: 0
SELECT GET_LOCK('Apache-Session-d279953494e7dcbbaca2e566a94002f2', 3600);

Why is it taking so long to get a lock on a table?  I know it isn't taking
forever to actually query the database because the page loaded almost
immediately after the above query completed.  We're using InnoDB as opposed to
MyISAM.  Might that have something to do with it?

Any thoughts on this?

Keep up with me and what I'm up to: http://theillien.blogspot.com

More information about the rt-users mailing list