The above screeshots explain what the issue is, Docker does not have a default data limit when writing log files. The result is the drive filling up causing potential catastophic issues (corrupted storj), when Ram gets filled and there is no swap left.
My setup is having docker installed in lxc in proxmox
Proxmox>LXC>docker-Direct mount bind with host
I want to setup lograte or something similar to limit the max size of the log file. Problem is i don’t want to shutdown/nuke the container because i don’t want to risk starting over. I would gladly receive advice how i can mitigate this issue.
i tried sh -c “truncate -s 0 /var/lib/docker/containers/a9b6f57e749032ab09e1192cce357fa0bbb29412c0150b241d5b15b8a1522657/a9b6f57e749032ab09e1192cce357fa0bbb29412c0150b241d5b15b8a1522657-json.log”
Which solved the issue because its now empty, but it continues to keep writing logs, with absurd sizes. Also im not longer able to read the logs in portainer
i ended up doing this
nano /etc/docker/daemon.json
{
“log-driver”: “json-file”,
“log-opts”: {“max-size”: “100m”, “max-file”: “3”}
}
docker stop -t 300 storagenode
reboot now
docker start storagenode
let’s wait and see
unfortunately it did go to 0s up time :