Kill actions run as queries and so get queued

  • 13 August 2018
  • 3 replies

We have to limit the number of queries that Looker can run on our presto cluster, to prevent it getting overloaded.

However, this means that if someone cancels a query in looker, the query CALL system.runtime.kill_query(query_id => '20180813_181253_01046_d77wf') will get queued behind the other queries, and so won’t cancel the query immediately and prevent it taking up resources.

Is there a way around this? We have to put all of the looker queries in the same queue at the moment, because they run as the same user, but could the cancel queries be run as a different user? Or could Looker kill queries by the Presto API DELETE /v1/query/<query-id> instead?

3 replies

Userlevel 3

Hi @jthompson6

Thank you for bringing this up, this is an interesting scenario and I’ve passed it on to our engineering team. Currently there is not a way to set a different user to kill queries - Looker will send the kill query via the same method it sent the original command. However, it does look like there may be a way to prioritize types of queries in your Presto queue:

Perhaps this could provide a workaround as our team looks into this?



Thanks for your reply Molly.

Resource groups are the newer version of queues, and it is possible that I can use the queryType property to prioritise the cancel queries, I will have to upgrade presto to find out.


We upgraded presto and switched to resource groups. The kill queries run as “queryType”: “DATA_DEFINITION” so putting those in their own group fixed the problem.