Who's locking ?

2006-07-29 Thread Marco Simon
Hello list,

I've a question about understanding table-locks of myisam-tables:

From time to time it happens that my proccesslist gets flooded by
Queries, that
are waiting for a locked table. Quickly there are 100-500 waiting
Queries in the
queue - some of them waiting since more than 1000 seconds.

My question is: How can I see who (which query) set the lock, which all
other
queries are waiting for to be released ? I thought there should be at
least one
update Query in the processlist, which set the lock and which is still
working.
But there are only locked queries for the locked table - no updates, no
deletes.

Could somebody try to explain, how I can investigate, who's blocking the
line ?





smime.p7s
Description: S/MIME Cryptographic Signature


Re: Who's locking ?

2006-07-29 Thread Eric Bergen

Marco,
  It is also possible to set table locks by hand using a lock table
query. These connections will simply show up as sleeping or doing
something else. There currently isn't a show locks command in MySQL.
Depending on what the process list looks like tracking it down could
be as simple as looking for the sleeping connection that has been
asleep for about as long as the longest locked select. If it's locking
tables then doing something else it may be more difficult.


On 7/29/06, Marco Simon [EMAIL PROTECTED] wrote:

Hello list,

I've a question about understanding table-locks of myisam-tables:

From time to time it happens that my proccesslist gets flooded by
Queries, that
are waiting for a locked table. Quickly there are 100-500 waiting
Queries in the
queue - some of them waiting since more than 1000 seconds.

My question is: How can I see who (which query) set the lock, which all
other
queries are waiting for to be released ? I thought there should be at
least one
update Query in the processlist, which set the lock and which is still
working.
But there are only locked queries for the locked table - no updates, no
deletes.

Could somebody try to explain, how I can investigate, who's blocking the
line ?









--
Eric Bergen
[EMAIL PROTECTED]
http://www.provenscaling.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]