RT Performance - Intermittent slow spells

Hi,
We are currently having some intermittent problems where our RT stops
responding. I have isolated this I think to a database problem of some
sort. I turned on Slow Query logging and this is what MySQL picked up. Any
ideas what may cause such performance issues. It is intermittent but very
annoying when it does occur. I have tuned the DB with mysqltuner and when
it does run proper then it really hums along.

Time: 090317 12:42:29

User@Host: rt[rt] @ localhost []

Query_time: 11 Lock_time: 0 Rows_sent: 1 Rows_examined: 0

SELECT GET_LOCK(‘Apache-Session-288c54fb38d789956edc518ca4321abb’, 3600);

User@Host: rt[rt] @ localhost []

Query_time: 11 Lock_time: 0 Rows_sent: 1 Rows_examined: 0

SELECT GET_LOCK(‘Apache-Session-288c54fb38d789956edc518ca4321abb’, 3600);

User@Host: rt[rt] @ localhost []

Query_time: 11 Lock_time: 0 Rows_sent: 1 Rows_examined: 0

SELECT GET_LOCK(‘Apache-Session-288c54fb38d789956edc518ca4321abb’, 3600);

Regards

Aaron

Hi,
We are currently having some intermittent problems where our RT stops
responding. I have isolated this I think to a database problem of some
sort. I turned on Slow Query logging and this is what MySQL picked up. Any
ideas what may cause such performance issues. It is intermittent but very
annoying when it does occur. I have tuned the DB with mysqltuner and when
it does run proper then it really hums along.

Time: 090317 12:42:29

User@Host: rt[rt] @ localhost

Query_time: 11 Lock_time: 0 Rows_sent: 1 Rows_examined: 0

SELECT GET_LOCK(‘Apache-Session-288c54fb38d789956edc518ca4321abb’, 3600);

User@Host: rt[rt] @ localhost

Query_time: 11 Lock_time: 0 Rows_sent: 1 Rows_examined: 0

SELECT GET_LOCK(‘Apache-Session-288c54fb38d789956edc518ca4321abb’, 3600);

User@Host: rt[rt] @ localhost

Query_time: 11 Lock_time: 0 Rows_sent: 1 Rows_examined: 0

SELECT GET_LOCK(‘Apache-Session-288c54fb38d789956edc518ca4321abb’, 3600);


Regards

Aaron

Aaron,

Check the length of your session data. I expect that you have a couple
of very large sessions that a taxing your DB I/O subsystem. If you
delete them, the offending user will need to login again, but your
performance should be back to normal. I do not know what causes this
bloating of the session data, but my current 3000 entry session table
entries are all less than 75k. When I see this problem, there is usually
1 session in the 5-20MB range. Here is the query I use in PostgreSQL
which should be close to what you need:

SELECT id,length(a_session) FROM sessions ORDER BY length(a_session)
DESC LIMIT 10;

This pruning could be done easily from a cronjob.

Cheers,
Ken