saurabh18cs
Honored Contributor III

The OutOfMemoryError: GC overhead limit exceeded error in Spark typically indicates that the JVM garbage collector is spending too much time trying to free up memory and is unable to do so effectively.

 

do you have large data volumes?

  1. Increase Executor Memory or switch to memory optimized compute:

    • Increase the memory allocated to each executor to handle larger data volumes
  2. set spark.sql.shuffle.partitions to auto
  3. cache your dataframes to avoid recomputation
 
df_bs_exploded1.cache()
 
df_allocations.cache()
 
df_joined.cache()