Docker containers
If your site runs in Docker, each part lives in its own container. A container that keeps restarting or has quietly stopped can take a part of your site down without any obvious error on the server itself.
- At a glance
- Group
- Availability
- Mellonbot
- Can fix it
- What it does
- Restarts the container and explains why it failed.
- Approval
- Always with your OK
What you’ll notice
- 01A container’s status says “Restarting” or “Exited”
- 02Part of the site, like the API or background jobs, stops working
- 03The site works for a minute, then fails again
- 04A container shows as “unhealthy”
Why it usually happens
- 01The app inside crashes on start because of a settings error
- 02It runs out of memory and gets stopped
- 03A service it depends on, like the database, isn’t ready
- 04The disk is full, often from old images and logs
Fix it yourself
How to fix it by hand
Comfortable with a terminal? Here’s what an experienced admin would do. Start with the read-only commands.
- 01
List all containers
Look at the status column for “Restarting” or “Exited”.
docker ps -a - 02
Read a container’s logs
Replace my-app with the container’s name.
docker logs --tail 100 my-app - 03
Check how it exited
An exit code of 137 usually means it ran out of memory.
docker inspect --format "{{.State.ExitCode}} {{.State.OOMKilled}}" my-app - 04
Check Docker’s disk use
Old images and build cache can fill the disk.
docker system df - 05
Restart the container
After fixing the cause, restart it and watch its status.
docker restart my-app && docker ps --filter name=my-app
With Mellonbot
How Mellonbot fixes it
- Watches your containers for restarts, exits and failing health checks.
- Reads the container’s logs and explains why it failed in plain English.
- Offers to restart the container — shown with its risk first, then verified afterwards.
- Flags Docker images and build cache that are eating disk space.
Not sure this is your problem? Ask us →
FAQ
Docker containers: common questions
Why does my Docker container keep restarting?
The app inside is crashing, and Docker’s restart policy keeps starting it again. Its logs almost always show the error — a missing setting, a database it can’t reach, or not enough memory.
What does exit code 137 mean?
The container was stopped because the server or Docker ran out of memory for it.
Still have a question?
Every message goes straight to the founder.
Related
Often seen together
Free plan · 100 credits to start
Let Mellonbot look after your website
Create a free account and connect your first site in a few minutes. Upgrade only when you need more.
- No card needed
- Leave any time
Prefer to talk first? Get in touch →
- ✓ 100 credits to start
- ✓ No card needed
- ✓ One command to connect your site
Already have an account? Sign in