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
New Contributor III
New Contributor III

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 ?


Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!