Exit Code: 137, Exit Message: "OOM Killed" Docker-Driver Java Container

Hi together,

i am new to nomad and currently I am testing to migrate my docker stacks to nomad.

Currently I am getting an error that a container was killed by oom when I try to run a job that is running the java image mbentley/omada-controller:latest:

Exit Code: 137, Exit Message: "OOM Killed"

It does not make any difference if I set memory resources for the task.

I found an issue that descripes a similar behaviour but did not provide a solution: Java 11 Service is OOM killed but only in Nomad · Issue #8141 · hashicorp/nomad · GitHub

Did anyone experiance the same issue with java containers and can help me to solve the problem?

Note: The job is deployed on a Proxmox KVM virtual maschine. I can see those oom kills on the console of the vm. If I run the container manually with docker or docker compose, there is no issue and the container is running fine.

Thanks and best regards,

Found the solution, as nomad containers seems not to be allowed to use swap, the container gets oom-killed correctly due to out of memory error when consuming more than the default 300mb mem limit.

With manual docker containers, swapping is enabled by default and thats why the error did not occour. Increasing the memory via resources, its working fine.

1 Like