sameersbn / docker-bind

Dockerize BIND DNS server with webmin for DNS administration
MIT License
913 stars 333 forks source link

FATAL: logfileWrite: stdio:/var/log/squid3/access.log: (28) No space left on device #50

Closed sameersbn closed 5 years ago

sameersbn commented 6 years ago

After running a month the docker fails because its has not enough space on hard disk

docker[1001]: 2016/03/07 11:48:22| Loaded Icons.
docker[1001]: 2016/03/07 11:48:22| HTCP Disabled.
docker[1001]: 2016/03/07 11:48:22| Pinger socket opened on FD 10
docker[1001]: 2016/03/07 11:48:22| Squid plugin modules loaded: 0
docker[1001]: 2016/03/07 11:48:22| Adaptation support is off.
docker[1001]: 2016/03/07 11:48:22| Accepting HTTP Socket connections at local=[::]:8080 remote=[::] FD 8 flags=9
docker[1001]: 2016/03/07 11:48:23| storeLateRelease: released 0 objects
docker[1001]: 2016/03/07 11:48:24| Closing HTTP port [::]:8080
docker[1001]: 2016/03/07 11:48:24| storeDirWriteCleanLogs: Starting...
docker[1001]: 2016/03/07 11:48:24|   Finished.  Wrote 0 entries. 
docker[1001]: 2016/03/07 11:48:24|   Took 0.00 seconds (  0.00 entries/sec).
docker[1001]: FATAL: logfileWrite: stdio:/var/log/squid3/access.log: (28) No space left on device
docker[1001]: 
docker[1001]: 2016/03/07 11:48:24| Closing Pinger socket on FD 10

The host machine has space in their hard drive.

[root@docker ~]# df -h
Filesystem                      Size  Used Avail Use% Mounted on
devtmpfs                         16G     0   16G   0% /dev
tmpfs                            16G   12K   16G   1% /dev/shm
tmpfs                            16G 1000K   16G   1% /run
tmpfs                            16G     0   16G   0% /sys/fs/cgroup
/dev/mapper/fedora_docker-root  123G   19G  104G  16% /
tmpfs                            16G  8,0K   16G   1% /tmp
/dev/cciss/c0d0p1               477M  100M  348M  23% /boot
tmpfs                           3,2G     0  3,2G   0% /run/user/0
sameersbn commented 6 years ago

➤ Tárliton Godoy commented:

Hello, I had a problem similar to this. Here is what I found out:

If you create a container with this image, a volume will be created as well. This volume will contain the squid cache folder with it's contents. Because the way the squid cache works (and it's configured in the squid.conf https://github.com/sameersbn/docker-squid/blob/master/squid.conf#L2972), this folder will contains several small files. When you remove a container, it's volumes won't be removed and you can check that running this command:

docker volume ls -qf dangling=trueNow you are left with a folder with a bunch of small files. Over time, that will decrease the inodes left on your disk(source here) and you will get a message saying that there is no more space on the device.

You can either specify the volume you want to use and keep reusing it or you have to keep removing dangling volumes.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

sameersbn commented 5 years ago

gh seems to have somehow moved this squid issue here