Exit code 137 on Coolify: why your container was killed, and how to get warned
Coolify exit code 137 means the kernel killed your application, nearly always for memory. Coolify runs each application as a Docker container on your server. By default it sets no memory limit, so a container can grow until the whole server runs out. For the general picture, see exit code 137 and OOM killed.
What you see
The application shows as exited or restarting, and its restart count goes up. The runtime logs stop mid-line, because a killed process cannot write a last message. If another container on the same server died at the same time, the server ran out of memory and the kernel picked one, and it may not be the container that grew.
Confirm it on the server
SSH into the server and run:
docker inspect <container> --format '{{.State.OOMKilled}} {{.State.ExitCode}}'
journalctl -k | grep -i "killed process"
free -htrue 137 means an OOM kill. The kernel log says which kind: Memory cgroup out of memory means the container hit its own limit, while a plain Out of memory: Killed process line means the whole server ran short. false 137 with no such line means a plain SIGKILL, such as a stop that timed out.
How to fix it
- Set a memory limit per application. In the application’s Resource limits settings, set Memory limit (0 means no limit). A limit keeps one leaking app from taking the database and Coolify itself down with it.
- Leave room for the server. The limits of all containers, plus Coolify, the proxy and your databases, should fit in the server’s RAM.
- Add swap as a cushion, not a fix. It buys time on a small VPS, but a leak still fills it.
- Cap the runtime. For Node, set
--max-old-space-sizeto about 75 percent of the container’s limit. - Move the database to its own server once the apps outgrow the box.
What Coolify warns you about
Coolify notifies on deployments, resource status changes (a container stopping unexpectedly), restart-limit events, server reachability and disk usage, to email, Discord, Telegram, Slack, Pushover or a webhook. In practice, users report no notification when a container is killed or crashes. Sentinel draws CPU and memory charts once metrics are on, but it has no memory thresholds.