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 you use the 4.1 from sid, add the following changes also.
/etc/logrotate.d/squid
postrotate
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
fi
endscript
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
[Unit]
After=network.target network-online.target nss-lookup.target
Wants=network-online.target
[Unit]
After=network.target network-online.target nss-lookup.target
Wants=network-online.target
[Service]
LimitNOFILE=8192:65535
User=proxy
Group=proxy
LimitNOFILE=8192:65535
User=proxy
Group=proxy
Greetz,
Louis
Van: squid-users [mailto:squid-users-bounces@xxxxxxxxxxxxxxxxxxxxx] Namens Alex K
Verzonden: dinsdag 7 augustus 2018 9:46
Aan: squid-users@xxxxxxxxxxxxxxxxxxxxx
Onderwerp: Squid File descriptors warningHi all,I observed the following warning at squid cache logs:WARNING! Your cache is running out of filedescriptorsGoogling around I tried to increase the default file descriptors of the system (I am runnign Debian9 x64 bit), by setting at /etc/sysctl.conf:fs.file-max=802762Restarted 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) unlimitedWhere the "open files" seems to be the related one.I set also the following at squid conf:max_filedescriptors 65535I 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?Thanx,alex
_______________________________________________ squid-users mailing list squid-users@xxxxxxxxxxxxxxxxxxxxx http://lists.squid-cache.org/listinfo/squid-users