|
| Re: Locked query explosion [message #1598 is a reply to message #1562 ] |
Thu, 16 August 2007 08:42   |
Peter Messages: 405 Registered: August 2006 |
Senior Member Super Guru |
|
|
There is but it might be hard to catch
It may well be some query in the Sleep stage which just took the table and now sleeping with the lock or it could be some long running query which uses this table (these are easy to catch)
One of the frequent reasons for this problem is using persistent connection when script is aborted after locking the table and it could take a while before some other script runs unlock tables in the same connection to set table free.
Peter Zaitsev, MySQL Performance Expert
MySQL Performance Blog - http://www.mysqlperformanceblog.com
MySQL Consulting http://www.mysqlperformanceblog.com/mysql-consulting/
|
|
|
|
| Re: Locked query explosion [message #1639 is a reply to message #1636 ] |
Fri, 17 August 2007 05:28  |
Peter Messages: 405 Registered: August 2006 |
Senior Member Super Guru |
|
|
Which MySQL version is that ? What OS ?
Also try running "mysqladmin debug" which will post you some data about who owns table locks.
When this happens try killing all connections which are not waiting for lock tables as this would release the lock
It is possible some connection lock the table and when does long batch job but no long queries....
It also could be spme form of threading or MySQL bug with lock beomming stale
Peter Zaitsev, MySQL Performance Expert
MySQL Performance Blog - http://www.mysqlperformanceblog.com
MySQL Consulting http://www.mysqlperformanceblog.com/mysql-consulting/
|
|
|