cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Set time out or Auto termination for long running query

NehaR
New Contributor II

Hi ,

We want to set auto termination for long running queries in data bricks adhoc cluster.

I attempted below two approaches in my notebook. Despite my understanding that queries should automatically terminate after one hour, with both the approaches queries exceeded this timeout limit and kept running

Approache 1:

SET spark.databricks.queryWatchdog.enabled=true;
SET spark.databricks.queryWatchdog.timeout=3600;
 
 
Approache 2:
SET STATEMENT_TIMEOUT = 3600;
 
Please suggest what wrong am i doing here?
 
 

 

1 REPLY 1

JissMathew
New Contributor II

Hi @NehaR  

Apply these settings at the cluster-level configuration in the Databricks UI:

Go to the Cluster Settings.
Add the following Spark configuration:
spark.databricks.queryWatchdog.enabled true

spark.databricks.queryWatchdog.timeout 3600

Restart the cluster to apply the settings.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group