cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Warehousing & Analytics
Engage in discussions on data warehousing, analytics, and BI solutions within the Databricks Community. Share insights, tips, and best practices for leveraging data for informed decision-making.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Databricks query on a warehouse failing with ` spark.driver.maxResultSize` error

vishva-fivetran
New Contributor II

we are trying to run a select * from one of our catalog tables. we are seeing the error : 

org.apache.hive.service.cli.HiveSQLException: Error running query: org.apache.spark.SparkException: Job aborted due to stage failure: Total size of serialized results of 237 tasks (16.0 GiB) is bigger than spark.driver.maxResultSize 16.0 GiB.

How do I increase the configuration for the warehouse to increase the maxResultSize ? 

I tried Workspace settings > Compute > warehouse > Data Access Configuration and SQL Configuration Parameters. Both of them did not support setting this query up. 

2 REPLIES 2

anardinelli
Contributor

Hello @vishva-fivetran how are you?

To set the spark.driver.maxResultSize property, you can do so in the cluster Spark config. The property spark.driver.maxResultSize can be set to a value higher than the value reported in the exception message. For example, if you want to set it to 17g, you would add 'spark.driver.maxResultSize 17g' to your Spark config.

Like this:

anardinelli_0-1718133234814.png

After that, please save and restart your cluster.

Be aware that setting a high limit can lead to out-of-memory errors in the driver, depending on spark.driver.memory and the memory overhead of objects in the JVM. Therefore, it's important to set an appropriate limit to prevent such errors.

Best,

Alessandro

Hi @anardinelli , Thanks for the answer. 

I am able to see the spark configuration for clusters in `All Purpose compute` tab , but am not able to see the spark configuration for a warehouse. Where do i add the spark configuration for a databricks warehouse ?


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