Databricks query on a warehouse failing with ` spark.driver.maxResultSize` error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2024 08:12 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2024 12:14 PM
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:
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2024 08:16 PM - edited 06-11-2024 08:16 PM
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 ?

