You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sql.connect wrongly reports a timeout when attempting to connect to a non-existing warehouse #481
Calling databricks.sql.connect with a non-existing warehouse_id will raise a generic time-out exception, coming from the ThriftBackend.
It's only by digging in the source code that one can find the default of 30(!) retries - which can be set by including _retry_stop_after_attempts_count in sql.connect.
As a user of SQL Client, I'd like to easily make a distinction between a timeout (=unknown circumstances, makes more sense to retry) and a non-existing/deleted warehouse (=hard fact, makes no sense to keep trying to connect).
HTTPSConnectionPool(host='[xxxx.databricks.com](http://xxxx.cloud.databricks.com/)', port=443):
Max retries exceeded with url: /sql/1.0/warehouses/786786d78562786
(Caused by ResponseError('too many 404 error responses')).
Alternatives considered
One can add another dependency to the SDK and check if the Warehouse exists. It seems overkill to add the SDK just for that purpose. It really should be part of the connect client.
One can parse the exception text and apply some heuristics to form an educated guess with the 404 reply. This is hacky and might have too many edge-cases. E.g. calling /sql/1.0/**warehoses**/xxxxxwould raise the exact same exception.
We've hit a similar issue, we noticed an incorrect hostname would result in the default retry path which times out after 15 minutes. We tried to get around this by setting _retry_stop_after_attempts_count=3, but that breaks the cluster-warmup case where the connector needs to patiently retry 503+Retry-After for several minutes. It creates a poor experience for our users if they mistype the hostname. We would greatly appreciate if someone could take a look at this, thank you.
This is fixed: HTTP 404 responses are no longer retried, so connecting to a non-existent warehouse now fails fast with an ENDPOINT_NOT_FOUND error (telling you the endpoint does not exist) instead of retrying until timeout. The change landed in #735 and was first released in 4.2.5; on the latest release (4.10.0) the error comes back in under a second. If you still see a timeout with a mistyped hostname, please open a new issue.
Activity
paulteehan commentedon Apr 14, 2026
We've hit a similar issue, we noticed an incorrect hostname would result in the default retry path which times out after 15 minutes. We tried to get around this by setting _retry_stop_after_attempts_count=3, but that breaks the cluster-warmup case where the connector needs to patiently retry 503+Retry-After for several minutes. It creates a poor experience for our users if they mistype the hostname. We would greatly appreciate if someone could take a look at this, thank you.
cathleeny commentedon Dec 3, 2026
This is fixed: HTTP 404 responses are no longer retried, so connecting to a non-existent warehouse now fails fast with an
ENDPOINT_NOT_FOUNDerror (telling you the endpoint does not exist) instead of retrying until timeout. The change landed in #735 and was first released in 4.2.5; on the latest release (4.10.0) the error comes back in under a second. If you still see a timeout with a mistyped hostname, please open a new issue.