Khaja_Zaffer
Esteemed Contributor

You can configure a timeout for your Spark queries by setting the spark.databricks.queryWatchdog.timeoutInSeconds configuration property. This will automatically terminate any query that exceeds the specified execution time, preventing them from becoming long-running orphans.