[squid-users] Squid File descriptors warning

L.P.H. van Belle belle at bazuin.nl
Tue Aug 7 08:44:03 UTC 2018

I do know there is/was a bug the systemd isnt picking up the filedescriptors with systemd, you might have hit it. 
Im suspecting your start script is a sysv script invoked by systemd. 
Try to set the limits within the start script (sysv) so the correct users ( running squid ) gets the filedescriptors.
I run Debian 9, with a recompiled squid from debian sid and that work fine for me atm. 
If you use the 4.1 from sid, add the following changes also. 

            if [ -d /run/systemd/system ] && command systemctl >/dev/null 2>&1 && systemctl is-active --quiet squid.service; then
                systemctl restart squid.service
            elif [ -f /var/run/squid.pid ]; then
                test ! -e /var/run/squid.pid || test ! -x /usr/sbin/squid || /usr/sbin/squid -k rotate

Try the following and the below the command created the file /etc/systemd/system/squid.service.d/override.conf 
Add there the following. 
systemctl edit squid
After=network.target network-online.target nss-lookup.target

Van: squid-users [mailto:squid-users-bounces at lists.squid-cache.org] Namens Alex K
Verzonden: dinsdag 7 augustus 2018 9:46
Aan: squid-users at lists.squid-cache.org
Onderwerp: [squid-users] Squid File descriptors warning

Hi all, 

I observed the following warning at squid cache logs: 

WARNING! Your cache is running out of filedescriptors

Googling around I tried to increase the default file descriptors of the system (I am runnign Debian9 x64 bit), by setting at /etc/sysctl.conf: 


Restarted system. Still was receiving the warnings. 

When checking further I observed that I have the following default limits: 

ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 15338
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 15338
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

Where the "open files" seems to be the related one. 

I set also the following at squid conf: 

max_filedescriptors 65535

I am running a compiled version 3.5.23. 

I am not sure I have done the correct steps or if I need to tweak the ulimits also.

Any experience from your side?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20180807/2497bd5c/attachment.html>

More information about the squid-users mailing list