Look at--log-opt max-size=10m --log-opt max-file=3 to keep the logging under control.
max-size The maximum size of the log before it is rolled. A positive integer plus a modifier representing the unit of measure (k, m, or g). Defaults to -1 (unlimited). --log-opt max-size=10m
max-file The maximum number of log files that can be present. If rolling the logs creates excess files, the oldest file is removed. Only effective when max-size is also set. A positive integer. Defaults to 1. --log-opt max-file=3
I’m guessing most people using docker are not leaving containers running for long periods of time without updating. For example, every time I update HA (which is ever other week following their release schedule), a fresh container is made and the old one destroyed. So at most, I have two weeks of docker logs (which if you don’t have something spamming an error or logs set to detail, isn’t very much)
I’ve just moved to a docker container and I’m having this issue. I’ve already used the log limiting lines listed above and the only camera I’m using is the one on my Skybell. After a few hours, container memory is showing around a GB. Next day it’s over 2GB. This morning it was sitting just over 3. Been running a few days…
Does that command hold across stop/starts of the container within Synology GUI? I was wondering if they could be added as environmental variables within the UI? Could you check to see if they are shown?
They don’t appear in the environment section that I can see. I’m still dealing with this even tough I start the container with the full command anytime I stop it. Going to have to dig into this further as it’s the only issue I have now with HA. When it ran on the RPi, I have to restart it every day or two to keep it stable. Now I can run a week or more. I restart it to do updates and changes so I really don’t know how long it will remain stable. I get up to 3 1/2GB ram usage or so and it seems to stay there…
I installed Home Assistant in docker via IOTstack, so I’m not using a docker run command to start Home Assistant. How do I change the log options? Can I use portainer?
And it seemed to be working. But after 20-22 hours the memory leak occured again
I really can’t seem to find the root cause of this… Until then, I will try limiting the memory resources for the HA container. That way I hope it won’t be able to bring the whole system down:
This is solved by installing portainer not as Hassio addon. However If I change the memory seting and deplay container the settings are again seat without limits. Any idea how to prevent that?
I am running supervised home assistant currently in docker on raspbian Raspberry pi 4 4GB. I wanted to limit ram as showed by DIY-techie on last picture.