Problem: Squid gets slow an hits Error Message kid1| WARNING! Your cache is running out of filedescriptors

Problem

After some time, squid gets slower and you can find the following message in squid-log:

kid1| WARNING! Your cache is running out of filedescriptors

Investigation:

You can grep in the cache.log to get the default, and verify changes:

grep "file descriptors" /var/log/squid/cache.log
2023/02/28 10:44:46 kid1| With 1024 file descriptors available

Solution

You can increase the max filedescriptors by setting it in the file /etc/squid/local_bottom.conf:

echo "max_filedescriptors 32768" >> /etc/squid/local_bottom.conf

after that, please restart squid

root@example:~# systemctl restart squid
root@example:~#
Mastodon