docker-squid
docker-squid copied to clipboard
FATAL: logfileWrite: stdio:/var/log/squid3/access.log: (28) No space left on device
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
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=true
Now 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.
I know this post is very old but, I found this when I faced the same issue and looking for solutions. I solved the issue for me and wanted to add here just in case someone else face the issue.
I changed the max_filedesc value to 4096 in my squid.conf file. And that is it.
My squid.conf file is here:
https://github.com/polarbit/squid-forward-proxy/blob/master/squid.conf
@polarbit thanks, you solve my problem.