Spark异常总结及解决办法2

Spark-sql

问题:spark-sql on yarn运行报错TransportClient:331 - Failed to send RPC *** java.nio.channels.ClosedChannelException

具体错误信息如下:

ERROR TransportClient:331 - Failed to send RPC RPC 5232077649582323523 to /10.62.124.41:41929: java.nio.channels.ClosedChannelException

解决方案:
查看NodeManager的日志,发现:

WARN org.apache.hadoop.yarn.server.nodemanager.containermanager.monitor.ContainersMonitorImpl: Container [pid=8101,containerID=container_e03_1552020687119_0005_02_000001] is running 624192000B beyond the 'VIRTUAL' memory limit. Current usage: 376.1 MB of 1 GB physical memory used; 2.7 GB of 2.1 GB virtual memory used. Killing container.

由此可以看出container使用的虚拟内存超过了设置的2.1G,被kill掉了。
container使用的虚拟内存是由以下公式计算的:
虚拟内存=yarn.scheduler.minimum-allocation-

你可能感兴趣的:(Spark)