Courseiva
Using Spark Connect →mediumMultiple Select

Databricks-Spark-Assoc Using Spark Connect Practice Question

A developer is troubleshooting a Spark Connect client that intermittently fails with connection errors to a Databricks cluster. Which two configuration practices help ensure stable connectivity? (Choose two.)

⚠ Common exam trap

The trap here is conflating server-side execution tuning settings such as shuffle partitions or adaptive execution with client-server transport configuration that actually governs Spark Connect connection stability.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Set `spark.remote.connect.grpc.maxInboundMessageSize` to a value large enough for the plans being sent.

Stable Spark Connect connectivity depends on transport-level configuration. Raising the maximum gRPC message size prevents failures when large logical plans are serialized, and configuring retry and timeout policies on the gRPC channel lets the client recover from transient network interruptions. Shuffle partitioning, TLS disabling, and adaptive execution settings do not address connection errors and may harm security or performance.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Set `spark.sql.adaptive.enabled` to false to stabilize the connection.

    Why it's wrong here

    Adaptive query execution changes runtime plan behavior on the server but has no bearing on client-server transport reliability. Toggling it does not prevent gRPC disconnects or message-size failures and may degrade performance. This setting is unrelated to connectivity, so it is not a valid practice here.

  • ✗

    Increase `spark.sql.shuffle.partitions` to 2000 to reduce the number of RPC calls.

    Why it's wrong here

    Shuffle partition count governs how many partitions a shuffle produces; it has no effect on the number or size of gRPC calls between client and server. Increasing it can actually add overhead and does not address connection errors. The setting is unrelated to transport stability, so it is not a valid practice for this scenario.

  • ✓

    Set `spark.remote.connect.grpc.maxInboundMessageSize` to a value large enough for the plans being sent.

    Why this is correct

    Large logical plans can exceed the default gRPC message size limit, causing connection or serialization errors. Raising the maximum inbound message size on both client and server allows bigger plans to be transmitted. This is a documented Spark Connect configuration that addresses failures when plans grow beyond defaults, making it a valid practice for stable connectivity.

  • ✗

    Disable TLS between the client and the cluster to reduce handshake overhead.

    Why it's wrong here

    Disabling TLS weakens security and is not supported for Databricks Spark Connect connections, which require encrypted transport. It does not reliably fix intermittent connection errors and would violate security requirements. Reducing handshake overhead is not a legitimate troubleshooting step for stability, so this option is incorrect.

  • ✓

    Configure client-side retry and timeout settings for the gRPC channel used by Spark Connect.

    Why this is correct

    Transient network interruptions can drop a gRPC stream, causing the client to fail. Configuring appropriate retry policies and timeouts on the Spark Connect gRPC channel allows the client to recover from brief outages and long-running calls. These settings are part of the client configuration surface and directly improve connection stability for intermittent failures.

About these practice questions

This Databricks-Spark-Assoc question is part of Courseiva's 295-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Databricks exam blueprint

This Databricks-Spark-Assoc practice question is part of Courseiva's free Databricks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Databricks-Spark-Assoc exam.