Hi everyone! I'm new to containerization, so please forgive me if I'm not using the right terms. I'm having an issue with my web servers hosted on Docker—they tend to stop working after about a day. It seems like it's the whole Docker Engine since restarting it temporarily resolves the problem. I've noticed that restarting my entire computer helps extend the uptime, sometimes by a day or so, but it can run fine for three days too. I'm using Docker v28.2.2 on MacOS. I'm wondering what could be causing this issue, and I'd appreciate any advice. I can provide more information if needed because it's quite frustrating, especially when I'm away from home and need access to these servers.
3 Answers
Honestly, it's tough to say without logs. If you’re on Docker Desktop for Mac, a common issue is a full disk. Docker doesn’t handle a full system disk very well and can get into a problematic state. You might want to check your disk space.
Sometimes a restart is the best fix, but you might have a container running an app with a memory leak that's affecting the whole system. Have you set memory limits for your containers? That could help.
You might want to check the 'Resource Saver' setting in Docker. I had a similar issue on Windows where it would go to sleep when not in use, which caused my containers to stop unexpectedly. I'm not sure how it works on Mac, but that could be worth investigating!
I just turned off the Resource Saver feature. Hopefully, this resolves the issue!
I just checked and I have 11 GB free right now. I’ll look into finding logs for more details.