How do I kill a running query?

215 views
Skip to first unread message

fla...@playax.com

unread,
Aug 23, 2017, 6:06:37 PM8/23/17
to MariaDB ColumnStore
When I try to kill a query running on a column store table by executing `kill QUERY_ID;`, the `COMMAND` field on the information_schema.processlist changes to `Killed`, but the query remains on the list, including the table locks held by it.

When I try executing `/usr/local/mariadb/columnstore/bin/cleartablelock LOCK_ID`, I get 

Rollback error: Unable to grab lock; Lock not found or still in use.
Table lock 60179 for table TABLE_NAME is not cleared.`

Is there a way to forcefully kill a query like this?
Our only solution was to forcefully restart the database with `ma restartsystem`.

Thanks,
Flávio Kon Rosenfeld

David Thompson

unread,
Aug 30, 2017, 12:46:27 AM8/30/17
to fla...@playax.com, MariaDB ColumnStore

Hi Flavio,

There is an earlier discussion on this, hopefully the following link will work:

https://groups.google.com/forum/#!searchin/mariadb-columnstore/kill%7Csort:relevance/mariadb-columnstore/7LV4aFoQFOw/JAMn6KKgBgAJ

 

When you run into this, what type of statement are you attempting to kill, query or DML statement? Is the connection remote and if so what client?

Do you have an example you recall?

--
You received this message because you are subscribed to the Google Groups "MariaDB ColumnStore" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mariadb-columns...@googlegroups.com.
To post to this group, send email to mariadb-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mariadb-columnstore/5eda73e2-3238-4520-993b-0a8e63c63ee0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

fla...@playax.com

unread,
Sep 5, 2017, 2:42:38 PM9/5/17
to MariaDB ColumnStore, fla...@playax.com
Hello,

I was trying to kill a DML statement (delete) from a remote client (Sequel Pro).

When I executed the delete statement, there was other connections inserting rows on the same table.
The delete was taking a lot of time (more than 10 minutes) so I decided to kill it, that is when I encountered the behavior I described on my original post.



On Wednesday, August 30, 2017 at 1:46:27 AM UTC-3, David Thompson wrote:

Hi Flavio,

There is an earlier discussion on this, hopefully the following link will work:

https://groups.google.com/forum/#!searchin/mariadb-columnstore/kill%7Csort:relevance/mariadb-columnstore/7LV4aFoQFOw/JAMn6KKgBgAJ

 

When you run into this, what type of statement are you attempting to kill, query or DML statement? Is the connection remote and if so what client?

Do you have an example you recall?

 

 

From: mariadb-c...@googlegroups.com [mailto:mariadb-c...@googlegroups.com] On Behalf Of fla...@playax.com
Sent: Wednesday, August 23, 2017 3:07 PM
To: MariaDB ColumnStore <mariadb-c...@googlegroups.com>
Subject: How do I kill a running query?

 

When I try to kill a query running on a column store table by executing `kill QUERY_ID;`, the `COMMAND` field on the information_schema.processlist changes to `Killed`, but the query remains on the list, including the table locks held by it.

 

When I try executing `/usr/local/mariadb/columnstore/bin/cleartablelock LOCK_ID`, I get 

 

Rollback error: Unable to grab lock; Lock not found or still in use.

Table lock 60179 for table TABLE_NAME is not cleared.`


Is there a way to forcefully kill a query like this?

Our only solution was to forcefully restart the database with `ma restartsystem`.

 

Thanks,

Flávio Kon Rosenfeld

--
You received this message because you are subscribed to the Google Groups "MariaDB ColumnStore" group.

To unsubscribe from this group and stop receiving emails from it, send an email to mariadb-columnstore+unsub...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages