cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Query has been timed out due to inactivity while connecting from Tableau Prep

AiswaryaS
New Contributor II

Hi,

We are experiencing Query timed out error while running Tableau flows with connections to Databricks. The query history for Serverless SQL warehouse initially showing as finished in Databricks. But later the query status change to "Query has been timed out due to inactivity".

I have verified that thee SQL warehouse doesn't auto-terminate in between. 

Has anyone encountered this before or knows how to prevent these timeouts?

Thanks

1 REPLY 1

mark_ott
Databricks Employee
Databricks Employee

The "Query has been timed out due to inactivity" error with Tableau flows connected to Databricks Serverless SQL Warehouse is a known and intermittent issue impacting several users, even when the SQL warehouse does not auto-terminate during the process. The core situation is that, after the query is reported as "finished" in Databricks, it later transitions to a timeout status due to inactivity, possibly reflecting a disconnect between Tableau (or another BI tool) trying to fetch results and the Databricks backend.โ€‹

Key Points and Causes

  • This timeout often occurs not because the query itself is long-running, but instead due to delays or failures in the client (Tableau) fetching results after the query completes in Databricks.โ€‹

  • In several similar cases involving Tableau and even Power BI, the query wall-clock time in Databricks can be short, but result-fetching by the client takes excessively long, resulting in a disconnect or timeout in Databricks regardless of client-side settings.โ€‹

  • It's not always related to SQL warehouse auto-termination; these errors can still happen even when the warehouse remains available.โ€‹

  • The issue can also arise from JDBC/ODBC connection settings, high network latency, or client-side timeouts.โ€‹

Suggestions and Workarounds

  • Check and, if possible, increase the query and connection timeout durations in Tableauโ€™s settings, as well as in the Databricks SQL Warehouse configuration. Databricks provides a STATEMENT_TIMEOUT parameter that controls maximum allowed execution time for SQL statements, but the inactivity timeout might be coming from a coordination issue between Tableau fetch and Databricks' expectations.โ€‹

  • Investigate JDBC/ODBC settings used by Tableau to connect to Databricks, adjusting idle timeout or keep-alive intervals to keep the connection active during long data fetch periods, especially for large data sets.โ€‹

  • If network instability is a factor, consider running Tableau Server and Databricks in closer network proximity or increasing resources to improve fetch times.โ€‹

  • If this is happening on certain tables/partitions that are much larger, consider breaking queries into smaller, more manageable chunks or optimizing the dataset to reduce fetch durations.โ€‹

  • It may not be possible to fully resolve this solely from the Tableau sideโ€”if the behavior persists, contact Databricks support with query IDs and timings, as community reports indicate this may sometimes be a cloud backend issue out of direct client control.โ€‹

Community and Support Engagement

  • This problem has been discussed in community forums, and users are encouraged to supply error messages and detailed flow history to Databricks or Tableau support for deeper debugging, as the fix can sometimes involve configuration changes or cloud-side updates.โ€‹

In summary, the error is likely related to an extended result fetch phase where Tableau waits for large datasets, causing Databricksโ€™ inactivity timer to trigger. Adjusting connection, query, and fetch timeout settings on both ends may mitigate the issue, but a robust solution may require assistance from both Tableau and Databricks support teams.โ€‹

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now