Skip to content

Who killed it

The situation

A Java service runs in a container with a 512 MB memory limit. It is killed and restarted every few hours.

The logs show no exception, no stack trace and no shutdown message. The container simply stops, and the exit code is 137.

Inside the container, free -m reports 16 GB of memory available. The JVM, reading that figure, has sized its heap accordingly and grows past 512 MB.

The host has 16 GB in total and is otherwise idle, so there is genuinely plenty of memory on the machine.

The exit code 137 is 128 + 9, meaning the process received SIGKILL. Who sent it, and why?