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@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?
Mathew
Keep up with me and what I’m up to: http://theillien.blogspot.com
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
It’s not a table lock. it’s a session lock. As in Apache::Session
lcoking that row for the duration of an HTTP request.
Keep up with my goings on at http://theillien.blogspot.com
Jesse Vincent wrote:
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
It’s not a table lock. it’s a session lock. As in Apache::Session
lcoking that row for the duration of an HTTP request.
So what you’re saying is that the query actually is taking that long?
One possible reason is previous lock that is there from another
request, so you really have to look for other slow queries that take
too much time so users don’t wait and click on links or restart
requests.On 11/7/07, Mathew Snyder theillien@yahoo.com wrote:
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@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?
Mathew
Keep up with me and what I’m up to: http://theillien.blogspot.com
The rt-users Archives
SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:
If you sign up for a new RT support contract before December 31, we’ll take
up to 20 percent off the price. This sale won’t last long, so get in touch today.
Email us at sales@bestpractical.com or call us at +1 617 812 0745.
Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com
Best regards, Ruslan.
But the slow query log only lists the “SELECT GET_LOCK…” queries. How do I get to the underlying query?
Keep up with my goings on at http://theillien.blogspot.com
Ruslan Zakirov wrote:
It’s possible that it’s not query, but something else that don’t allow
server to finish a request, but user already requested something else.
Oh, and that often happens when user opens many tickets at once in
several tabs(windows), so his requests stick in a queue waiting for
each other.On 11/7/07, Mathew theillien@yahoo.com wrote:
But the slow query log only lists the “SELECT GET_LOCK…” queries. How do I get to the underlying query?
Keep up with my goings on at http://theillien.blogspot.com
Ruslan Zakirov wrote:
One possible reason is previous lock that is there from another
request, so you really have to look for other slow queries that take
too much time so users don’t wait and click on links or restart
requests.
On 11/7/07, Mathew Snyder theillien@yahoo.com wrote:
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@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?
Mathew
Keep up with me and what I’m up to: http://theillien.blogspot.com
The rt-users Archives
SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:
If you sign up for a new RT support contract before December 31, we’ll take
up to 20 percent off the price. This sale won’t last long, so get in touch today.
Email us at sales@bestpractical.com or call us at +1 617 812 0745.
Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com
The rt-users Archives
SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:
If you sign up for a new RT support contract before December 31, we’ll take
up to 20 percent off the price. This sale won’t last long, so get in touch today.
Email us at sales@bestpractical.com or call us at +1 617 812 0745.
Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com
Best regards, Ruslan.
Yeah, I’ve experienced that. But, this isn’t related to opening multiple
tickets. Primarily, it happens when opening a ticket with numerous
comments/transactions, comments in which people didn’t trim out the previous
email thread, or large attachments. It seems that the actual query to gather up
all of these separate pieces of the ticket are executing rather quickly but the
lock is taking far too long.
Keep up with me and what I’m up to: http://theillien.blogspot.com
Ruslan Zakirov wrote:
Question:
As I stated before, our tables are using InnoDB. No particular reason, just the
default which wasn’t changed. If I use the InnoDB specific file
(my-innodb-heavy-4G.cnf) located in /usr/share/doc/mysql-server-xx and restart
the server, I lose everything when I refresh my screen. I can no longer access
RT at a glance. Instead, it appears that I’m dumped to the self-service screen.
How can I change mysqld to use this .cnf without breaking RT?
Keep up with me and what I’m up to: http://theillien.blogspot.com
Jesse Vincent wrote:
Mathew,
We use Oracle 9 something and I haven't noticed much degradation on
queries against tickets with a lot of attachements. We have over 50
queues and some of our users REALLY do not pay attention to all the
stuff they keep carrying forward. Maybe there is something about the way
your DB executes locks?
Kenn
LBNLOn 11/7/2007 8:44 AM, Mathew Snyder wrote:
Question:
As I stated before, our tables are using InnoDB. No particular reason, just the
default which wasn’t changed. If I use the InnoDB specific file
(my-innodb-heavy-4G.cnf) located in /usr/share/doc/mysql-server-xx and restart
the server, I lose everything when I refresh my screen. I can no longer access
RT at a glance. Instead, it appears that I’m dumped to the self-service screen.
How can I change mysqld to use this .cnf without breaking RT?
Keep up with me and what I’m up to: http://theillien.blogspot.com
Jesse Vincent wrote:
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
It’s not a table lock. it’s a session lock. As in Apache::Session
lcoking that row for the duration of an HTTP request.
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?
Mathew
Keep up with me and what I’m up to: http://theillien.blogspot.com
The rt-users Archives
SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:
If you sign up for a new RT support contract before December 31, we’ll take
up to 20 percent off the price. This sale won’t last long, so get in touch today.
Email us at sales@bestpractical.com or call us at +1 617 812 0745.
Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com
The rt-users Archives
SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:
If you sign up for a new RT support contract before December 31, we’ll take
up to 20 percent off the price. This sale won’t last long, so get in touch today.
Email us at sales@bestpractical.com or call us at +1 617 812 0745.
Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com