Number filedescriptors allowed too low for squid on Focal
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Squid |
Unknown
|
Unknown
|
|||
squid (Debian) |
Won't Fix
|
Unknown
|
|||
squid (Ubuntu) |
Invalid
|
Medium
|
Unassigned | ||
Focal |
Invalid
|
Undecided
|
Unassigned | ||
Hirsute |
Invalid
|
Undecided
|
Unassigned | ||
Impish |
Invalid
|
Medium
|
Unassigned |
Bug Description
On Ubuntu Bionic the maximum number of file descriptors was set to 65535 in system V initscript :
root@eolebase:~# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
root@eolebase:~# squidclient mgr:info | grep descriptors
Maximum number of file descriptors: 65535
Available number of file descriptors: 65529
Reserved number of file descriptors: 100
root@eolebase:~# grep 65535 /etc/init.d/squid
ulimit -n 65535
ulimit -n 65535
root@eolebase:~#
On Ubuntu Focal the maximum number of file descriptors is not modified by the (new) systemd initscript and errors like *WARNING! Your cache is running out of filedescriptors* ends up happening :
root@eolebase:~# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
root@eolebase:~# squidclient mgr:info | grep descriptors
stub time| WARNING: BCP 177 violation. Detected non-functional IPv6 loopback.
Maximum number of file descriptors: 1024
Available number of file descriptors: 1019
Reserved number of file descriptors: 100
root@eolebase:~#
It is possible to bypass that by overriding the unit but this adaptation should be in native squid systemd unit because it's a regression regression compared to Bionic :
root@eolebase:~# cat >>/etc/
[Service]
LimitNOFILE=65535
EOF
root@eolebase:~# systemctl daemon-reload
root@eolebase:~# systemctl restart squid.service
root@eolebase:~# squidclient mgr:info | grep descriptors
stub time| WARNING: BCP 177 violation. Detected non-functional IPv6 loopback.
Maximum number of file descriptors: 65535
Available number of file descriptors: 65530
Reserved number of file descriptors: 100
root@eolebase:~#
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: squid 4.10-1ubuntu1.4
ProcVersionSign
Uname: Linux 5.4.0-85-generic x86_64
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
Date: Tue Sep 14 09:43:12 2021
InstallationDate: Installed on 2021-07-07 (68 days ago)
InstallationMedia: EOLE 2.8.1 "Focal Fossa" - Release amd64 (20210707.1)
SourcePackage: squid
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in squid (Debian): | |
status: | Unknown → New |
Changed in squid (Debian): | |
status: | New → Won't Fix |
Thanks for the bug.
The situation is more complex than that and there is a great summary by Amos on the Debian bug - one fix is in 4.8, others to come later.
One will want to track upstream (and Debians) action on it for the next steps.
The suggestion you added do not seem to be a perfect fix for every situation, but it might serve as a workaround for anyone affected in the meantime.