Setting Query Timeouts and Managing Long-Running Queries in Looker

Hi everyone,

I'm reaching out to see if anyone has found a way to manage long-running queries in Looker or set up a timeout feature to prevent them from running indefinitely.

Our Looker instance contains some rather large and complex reports, and we’ve encountered situations where users unintentionally run queries that take a significant amount of time to complete. Ideally, we would like to set limits on query runtime to improve system performance and user experience.

I’m aware that Query Performance Metrics and other system admin explores can help identify queries after they’ve already run, but by that point, the impact has already been felt. I’m hoping to find a more proactive solution that can stop these long-running queries before they complete.

Has anyone successfully configured something similar or found an effective workaround? Any insights would be greatly appreciated!

1 REPLY 1

Good question!

Once the query is sent to the database, Looker is relatively hands-off. I recommend looking into your database documentation for ways to set timeouts for long queries.

Now, if there are enough queries to the point where they are queueing in Looker, then you do have some control over the amount of time they are allowed to stay in queue. Check the Admin Queries documentation for details about queue timeouts.