cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Knowledge Sharing Hub
Dive into a collaborative space where members like YOU can exchange knowledge, tips, and best practices. Join the conversation today and unlock a wealth of collective wisdom to enhance your experience and drive success.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Timeout handling with JDBC connection to SQL Warehouse

harripy
New Contributor III

We have tried to build a connection test logic to our software to try out the reachability of the SQL Warehouse, yet the connection parameters do not seem to function in expected manner.

When the SQL Warehouse is running, the connection test functions logically (one gets indication rather quickly if the connection can be created).

The challenge comes when the SQL Warehouse is stopped as the JDBC connection creation is kept idle until the SQL Warehouse has been started and the connection tested after that. This can take minutes, yet it would be good to get indication of the situation much faster e.g. "Warehouse STARTING, connection available after Warehouse RUNNING" or something similar.

We tried to play with JDBC parameters like

SocketTimeout

and 

TemporarilyUnavailableRetry

but nothing seems to help the JDBC driver to stop the waiting until the Warehouse is up and running.

Have we missed some crucial parameter that could help with this situation or should we try to solve the issue by investigating the SQL Warehouse status via Databricks SDK?

1 ACCEPTED SOLUTION

Accepted Solutions

NandiniN
Databricks Employee
Databricks Employee

Hello,

To create the connection you would need an endpoint, I would suggest you to give Serverless warehouse a try so that you don not have to wait, and for the suggestion on the product you may also submit a feedback and share the details of use case so that the feature requests can be prioritized. https://docs.databricks.com/en/resources/ideas.html

Thanks!

Nandini

View solution in original post

2 REPLIES 2

NandiniN
Databricks Employee
Databricks Employee

Hello,

To create the connection you would need an endpoint, I would suggest you to give Serverless warehouse a try so that you don not have to wait, and for the suggestion on the product you may also submit a feedback and share the details of use case so that the feature requests can be prioritized. https://docs.databricks.com/en/resources/ideas.html

Thanks!

Nandini

harripy
New Contributor III

Thanks @NandiniN !

After some further investigation, we discovered that the SocketTimeouts do not function inside container most probably due to this reported docker case (Socket timeout not working only on docker)

Of course that 

TemporarilyUnavailableRetry

could still respond in scenarios where the SQL Warehouse is down and the startup will take significant time.

Serverless warehouse is naturally another choice, indeed.

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