My docker containers are stopping constantly. reddit / selfhosted ---------------------------------------------------------------------- gerardit04 · 2023-11-19 11:08 I dont see anything in the container logs and I dont know what could it be ​ https://preview.redd.it/s00u07iqea1c1.png?width=1812&format=png&auto=w ebp&s=296fc0ee6eef5542575b8e37cbe20cd1beb82801 ---------------------------------------------------------------------- iluvfitnessmodels · 2023-11-19 11:26 Maybe memory limits of some kind ? you can set the maxium memory usage in a docker compose file for example! ---------------------------------------------------------------------- p_235615 · 2023-11-19 11:41 Most likely low memory, linux systems when there are out of memory calls the OOM killer, which kills the largest processes running on the system. https://unix.stackexchange.com/questions/153585/how-does-the-oom- killer-decide-which-process-to-kill-first You can probably find evidence of this in the system logs, on most modern systems, this should show you higher prio logs from last boot: `journalctl -p 4 -b` You should see something like this, if it was killed by OOM killer ` MESSAGE=Killed process 3029 (Web Content) total-vm:10206696kB, anon- rss:6584572kB, file-rss:0kB, shm em-rss:8732kB` And you should definitely think about extending the memory of the system or reducing the number of containers/they memory footprint. ---------------------------------------------------------------------- gerardit04 · 2023-11-19 12:17 Journactl doesn't work in unRAID. I don't thinks it's a memory problem usually memory usage is around 10-15GB and I have 40gb of memory ---------------------------------------------------------------------- stappersg · 2023-11-19 12:41 > Journactl doesn't work in unRAID. So do the `journalctl -p 4 -b` on the host self. ---------------------------------------------------------------------- traverseda · 2023-11-19 13:36 Really not enough information to go on here. I'm not familiar with unraid, but can you add `restart: always` to the compose file for these containers? Does it have a compose file? If you're sure it's not a memory issue (and it would be a bit odd for the OOM-kill to kill a bunch of containers like this), it could be an IO issue. A hard drive dying, maybe, but I think unraid should let you know about that? ---------------------------------------------------------------------- lilolalu · 2023-11-19 13:56 The question is not so much if you have enough physical ram but if your docker management tool has established resource limits for the containers. Oom killer will stop the process regardless of the fact that there is enough free memory if the container goes over its Ressource contraints. https://stackoverflow.com/questions/42345235/how-to-specify-memory- cpu-limit-in-docker-compose-version-3 ---------------------------------------------------------------------- gerardit04 · 2023-11-19 13:56 What do you mean with host self? ---------------------------------------------------------------------- lilolalu · 2023-11-19 13:57 You can also see oom killer messages with dmesg ---------------------------------------------------------------------- hdddanbrown · 2023-11-19 14:14 Ask /r/unraid ---------------------------------------------------------------------- mosaic_hops · 2023-11-19 14:55 On the host running unraid. ---------------------------------------------------------------------- clintkev251 · 2023-11-19 15:01 Unraid is the host.... ---------------------------------------------------------------------- pigers1986 · 2023-11-19 15:01 always put limits on containers ! i.e. ```version: '2.2' services: qbittorrent: container_name: qbittorrent cpus: 1 mem_limit: 1g environment: ``` ---------------------------------------------------------------------- stappersg · 2023-11-19 16:20 And under the hood is _Unraid_ a linux system. That is what I read in https://docs.unraid.net/unraid-os/manual/troubleshooting/ Further reading on the trouble shot page did not reveal how to get shell access to the Linux host system. So now I understand better why OP u/gerardit04 has trouble to execute the `journalctl -p 4 -b`. Obvious things are not always obvious. ---------------------------------------------------------------------- clintkev251 · 2023-11-19 16:35 Unraid is the system, you can SSH into it and run commands like any other system, or use the web terminal. It's just that it doesn't come with journalctl ---------------------------------------------------------------------- stappersg · 2023-11-19 16:58 > just that it doesn't come with journalctl That explains a lot. (Obvious things are not always obvious :-) ---------------------------------------------------------------------- adamshand · 2023-11-19 19:32 I thought limits only worked in swarms? ---------------------------------------------------------------------- pigers1986 · 2023-11-19 19:46 nope ---------------------------------------------------------------------- gerardit04 · 2023-11-19 21:26 I did that some days ago but still restarting ---------------------------------------------------------------------- gerardit04 · 2023-11-19 21:27 I didnt touch anything and this containers have been running since I have the server