`OOMKilled: true` and exit code 137.
BeginnerTroubleshootingResources, health checks, logging and restarts
Answer
Likely causes → Process exceeded --memory, a leak, or a limit too small for the workload (JVM, page cache for tmpfs).
Diagnose →
docker inspect -f '{{.State.OOMKilled}} {{.HostConfig.Memory}}' c
docker stats --no-stream c
dmesg -T | grep -i 'memory cgroup out of memory'
Fix → Raise the limit, tune the runtime (heap -Xmx or MaxRAMPercentage), fix leaks.
Prevent → Load-test to size limits; alert at 90% of the limit.
More on Resources, health checks, logging and restarts
Container restarts repeatedly: `docker ps` shows `Restarting (1) 5 seconds ago`.BeginnerContainer is `unhealthy` but the app works when tested manually.Intermediate`docker stats` shows 100%+ CPU and the container is slow.Intermediate`docker logs` is slow or `docker logs -f` hangs on a container with huge logs.Intermediate`Error response from daemon: configured logging driver does not support reading` when running `docker logs`.IntermediateApplication hangs and logs stop: log driver blocking (`fluentd: connection refused`).Advanced