Problem: Databricks Apps timeout when connecting to SQL Warehouses, but same connection works locall
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2025 04:10 AM
Problem: Databricks Apps timeout when connecting to SQL Warehouses, but same connection works locally. First Databricks App I've attempted to create. Symptoms:
- Local Streamlit app works fine with Databricks SQL connector
- Deployed Databricks App hangs while attempting connection to the data warehouse
- Same server_hostname, http_path
- App runs as service principal, local runs as user account
Technical Details:
- Using databricks-sql-connector Python package
- Unity Catalog (makena_dev.default)
- Pro SQL Warehouse (not Serverless)
- App has "Can Use" warehouse permissions, it also has access to the catalog, schema and specific table
- Connection timeout after 30-90 seconds
One thing I noticed is if I log into the Databricks GUI, it says my catalog is "hive_metastore". I added some diags in the application and it also says "hive_metastore" is catalog when I run locally.
Feel free to ask additional questions!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2025 11:04 AM
Hi @johnv,
Do you have any error messages you can share, or is it a silent connection timeout? I assume you confirmed that the SQL Warehouse had started up? (they can take several minutes to start up sometimes)
If that's not the issue, you could also confirm that the SQL Warehouse is UC enabled. Or, the networking path between the App and the warehouse might be restricted somehow -- maybe try connecting to a Serverless SQL Warehouse as a test.
-James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2025 08:16 AM
It is a silent timeout. No error messages. We have tried both regular ware houses and serverless. The App has access to both ware houses. The ware houses started up.
"If that's not the issue, you could also confirm that the SQL Warehouse is UC enabled. Or, the networking path between the App and the warehouse might be restricted somehow -- maybe try connecting to a Serverless SQL Warehouse as a test."
This may be an issue. Let me look into it.