Spark java.lang.OutOfMemoryError: Java heap space

后端 未结 12 2128
半阙折子戏
半阙折子戏 2020-11-22 13:55

My cluster: 1 master, 11 slaves, each node has 6 GB memory.

My settings:

spark.executor.memory=4g, Dspark.akka.frameSize=512

12条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-22 14:11

    Did you dump your master gc log? So I met similar issue and I found SPARK_DRIVER_MEMORY only set the Xmx heap. The initial heap size remains 1G and the heap size never scale up to the Xmx heap.

    Passing "--conf "spark.driver.extraJavaOptions=-Xms20g" resolves my issue.

    ps aux | grep java and the you'll see the follow log:=

    24501 30.7 1.7 41782944 2318184 pts/0 Sl+ 18:49 0:33 /usr/java/latest/bin/java -cp /opt/spark/conf/:/opt/spark/jars/* -Xmx30g -Xms20g

提交回复
热议问题