Share via

GRPC connection issue in serverless databricks -connect

Subray Hegde 0 Reputation points
2026-04-07T07:49:13.5+00:00

SUMMARY:


Queries executed via Databricks Connect v17 (Spark Connect / gRPC) on

serverless compute COMPLETE SUCCESSFULLY on the server side (Spark tasks

finish, results are produced), but the Spark Connect gRPC channel FAILS

TO DELIVER results back to the client application. The client receives

nothing, waits, and eventually cancels the query after its timeout.

This issue is 100% exclusive to Spark Connect. The Databricks SQL

Connector (poll-based HTTP) on the same data, same network, same user

has ZERO cancellations.

ENVIRONMENT:


• databricks-connect version: 17 (latest)

• Client: External Python application via Databricks Connect

• Compute: Serverless (SERVERLESS_COMPUTE)

• Protocol: SPARK_CONNECT (gRPC / HTTP2)

EXACT FAILURE FLOW:


  1. Client app sends query via Databricks Connect (gRPC) → serverless
  2. Serverless executes query — Spark tasks complete, results produced
  3. *** Server FAILS to stream results back via gRPC *** (result_fetch_duration_ms = 0 — result delivery never starts)
  4. Client waits... receives nothing... hits app timeout
  5. Client cancels query/session
  6. Query recorded as CANCELED in query history
Azure Databricks
Azure Databricks

An Apache Spark-based analytics platform optimized for Azure.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Smaran Thoomu 35,125 Reputation points Microsoft External Staff Moderator
    2026-04-08T04:08:37.79+00:00

    @Subray Hegde Hey there! It sounds like you’re running into a current limitation with Spark Connect (gRPC) on serverless compute—your queries finish on the server side but the gRPC channel never actually streams the results back to your client. Here’s what’s likely going on and how you can work around it:

    1. Spark Connect support is only GA on all-purpose clusters right now • Serverless compute (the SQL-warehouse–style endpoints) don’t yet support the bidirectional HTTP/2 streaming that Spark Connect relies on. • That’s why your Databricks SQL Connector (HTTP-polling) works fine, but gRPC stalls as soon as it tries to send rows back.
    2. Workarounds • If you need Spark Connect today, spin up an all-purpose cluster instead of a serverless endpoint. Make sure you’ve got spark.databricks.service.server.enabled=true on the cluster and you’re on a Databricks Runtime that matches your databricks-connect client version. • If you absolutely need serverless compute, continue using the SQL Connector (poll/HTTP based), which is fully supported.
    3. Next steps / follow-up questions To nail down exactly what’s happening, can you share a bit more info? • Have you confirmed whether Spark Connect works against an all-purpose cluster in your workspace? • Are there any HTTP/2 proxies or corporate gateways between your client and Databricks? (gRPC streaming can break if a proxy doesn’t support HTTP/2.) • Can you grab driver/executor logs from your serverless session to see if any gRPC errors show up? • Which exact Spark Runtime and databricks-connect client version are you matching?

    Reference docs you might find helpful:

    • Troubleshooting Databricks Connect for Python:

    https://learn.microsoft.com/azure/databricks/dev-tools/databricks-connect/python/troubleshooting

    • Troubleshooting Databricks Connect for Scala:

    https://learn.microsoft.com/azure/databricks/dev-tools/databricks-connect/scala/troubleshooting

    • Advanced usage of Databricks Connect (gRPC over HTTP/2, custom headers, proxies):

    https://learn.microsoft.com/azure/databricks/dev-tools/databricks-connect/advanced#use-spark-connect-server-with-databricks-connect

    • Serverless compute networking & connectivity guide:

    https://learn.microsoft.com/azure/databricks/security/network/serverless-network-security

    Hope this sheds some light. Let me know the answers to those follow-up questions, and we’ll dig deeper!

    Note: This content was drafted with the help of an AI system. Please verify the information before relying on it for decision-making.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.