Error: container killed by YARN for exceeding memory limits xxxx GB of yyyy physical memory used

Symptom

While running a query in Spark an error is returned which contains the following phrase:

container killed by YARN for exceeding memory limits xxxx GB of yyyy physical memory used

Cause

This error can occur because the container hosting the executor may need more memory for overhead tasks than currently permitted. It is also possible that this occurs because the container hosting the executor may need more memory for executor tasks than currently permitted

Action

If the error indicates that the memoryOverhead may have been the source of the issue then it will be necessary to increase spark.yarn.executor.memoryOverhead by at least the difference between xxxx and yyyy as stated in the error. Alternatively is this does not resolve the issue increase spark.yarn.executor.memory by at least the difference between xxxx and yyyy as stated in the error.

Have more questions? Submit a request

Comments

Powered by Zendesk