Repaso
EspaƱol
Cloud & DevOpsAdvancedOPS-07

A container is killed with exit code 137. What usually happened?

Options

  1. A syntax error in the code stopped the container at startup
  2. It got SIGKILL (128 + 9), often from the OOM killer at the memory limit (Correct option)
  3. A normal shutdown that was requested with docker stop
  4. A network timeout while the container pulled its image

Answer

It received SIGKILL (128 + 9), very often from the OOM killer hitting the memory limit

Why

Exit codes above 128 mean 'killed by a signal': code = 128 + signal number. 137 = 128 + 9, and signal 9 is SIGKILL, which cannot be caught.

The most common reason is the container using more memory than its limit, so the kernel's OOM (out-of-memory) killer stops it.

Check with docker inspect (OOMKilled: true) or kubectl describe pod. 143 = SIGTERM, a normal stop request.

Remember

137 = killed (often out of memory). 143 = asked to stop.

Key terms

Practice this question in Repaso