I'm trying to fix it with this code but it's not working for me . i'm reading just a json file with 2.7 MB
conf = SparkConf().set("spark.cores.max", "16g") \
.set("spark.driver.memory", "16g") \
.set("spark.executor.memory", "16g") \
.set("spark.executor.memory_overhead", "16g") \
.set("spark.driver.maxResultsSize", "0")
spark = SparkSession.builder\
.master("local[1]")\
.appName("name")\
.config(conf=conf)\
.getOrCreate()