The short story is that I have a magento installation.
It ran on a mysql 5.1.41 (ubuntu). It was crashing every now and then.
(when trying to insert or delete from certain tables that ware running sone DDL statements like truncate and alter table).
I upgraded to mysql 5.5.15 (from source), and the crashes became rarer ... but still happening. So I moved to Percona 5.5.20-rel24.
No I no longer had crashes in the last month or so, but I am running (at each reindex) into another issue.
| Id | User | Host | db | Command | Time |
State |
Info
| Rows_sent | Rows_examined | Rows_read |
+--------+-------+---------------------+-------+---------+-- ----+---------------------------------+--------------------- ------------------------------------------------------------ ---------------------+-----------+---------------+---------- -+
| 223351 | mydatabase | www.local:40590 | mydatabase | Query |
372 | Waiting for table metadata lock | TRUNCATE TABLE
catalogsearch_result
| 0 | 0 | 1 |
| 224815 | mydatabase | www.local:52419 | mydatabase | Query |
92 | Waiting for table metadata lock | TRUNCATE TABLE
catalogsearch_result
| 0 | 0 | 1 |
| 225117 | mydatabase | www.local:52467 | mydatabase | Query |
37 | Waiting for table metadata lock | TRUNCATE TABLE catalogsearch_result
The problem I have is that no other running query is related to catalogsearch_result. And no lock is shown in innodb status.
Am am somewhat confused.
As I read here :
http://blog.ulf-wendel.de/2011/waiting-for-table-metadata-lo ck-and-peclmysqlnd_ms/
I know it is possible to provoke metadata lock using an valid sql on a nonexisting table . But that's not the case here. Even if is a rather unexpected behaviour and rogue behaviour, I have no DROPS and no operations with nonexisting tables..
The bug seems to be a lot like :
http://bugs.mysql.com/bug.php?id=60563
and this
http://bugs.mysql.com/bug.php?id=61935
Here is also a innodb status :
http://pastebin.com/0A022ASv
First thing would be ... How do I see what query issued a metadata lock ? Second would be of course ... how do I avoid metadata lock issues.
It ran on a mysql 5.1.41 (ubuntu). It was crashing every now and then.
(when trying to insert or delete from certain tables that ware running sone DDL statements like truncate and alter table).
I upgraded to mysql 5.5.15 (from source), and the crashes became rarer ... but still happening. So I moved to Percona 5.5.20-rel24.
No I no longer had crashes in the last month or so, but I am running (at each reindex) into another issue.
| Id | User | Host | db | Command | Time |
State |
Info
| Rows_sent | Rows_examined | Rows_read |
+--------+-------+---------------------+-------+---------+-- ----+---------------------------------+--------------------- ------------------------------------------------------------ ---------------------+-----------+---------------+---------- -+
| 223351 | mydatabase | www.local:40590 | mydatabase | Query |
372 | Waiting for table metadata lock | TRUNCATE TABLE
catalogsearch_result
| 0 | 0 | 1 |
| 224815 | mydatabase | www.local:52419 | mydatabase | Query |
92 | Waiting for table metadata lock | TRUNCATE TABLE
catalogsearch_result
| 0 | 0 | 1 |
| 225117 | mydatabase | www.local:52467 | mydatabase | Query |
37 | Waiting for table metadata lock | TRUNCATE TABLE catalogsearch_result
The problem I have is that no other running query is related to catalogsearch_result. And no lock is shown in innodb status.
Am am somewhat confused.
As I read here :
http://blog.ulf-wendel.de/2011/waiting-for-table-metadata-lo ck-and-peclmysqlnd_ms/
I know it is possible to provoke metadata lock using an valid sql on a nonexisting table . But that's not the case here. Even if is a rather unexpected behaviour and rogue behaviour, I have no DROPS and no operations with nonexisting tables..
The bug seems to be a lot like :
http://bugs.mysql.com/bug.php?id=60563
and this
http://bugs.mysql.com/bug.php?id=61935
Here is also a innodb status :
http://pastebin.com/0A022ASv
First thing would be ... How do I see what query issued a metadata lock ? Second would be of course ... how do I avoid metadata lock issues.
. So I am open to any suggestions. (where to look, what tools to use to get more data, anything at all ).
Comment