From df65b5ecdfcceb0e90d425becdb36f112a1ea310 Mon Sep 17 00:00:00 2001 From: Stig Telfer Date: Tue, 21 Mar 2023 12:33:37 +0000 Subject: [PATCH] Fix Squid crash on startup Fix squid fatal error of this form: FATAL: xcalloc: Unable to allocate 1073741816 blocks of 432 bytes! Relating to max open files being 2^30 in Rocky base image. Set a sensible cap of 10000 open FDs. --- etc/kayobe/containers/squid_proxy/squid.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etc/kayobe/containers/squid_proxy/squid.conf b/etc/kayobe/containers/squid_proxy/squid.conf index 24a289dfa..930e12736 100644 --- a/etc/kayobe/containers/squid_proxy/squid.conf +++ b/etc/kayobe/containers/squid_proxy/squid.conf @@ -63,6 +63,10 @@ cache_dir ufs /var/spool/squid 4096 16 256 cache_mem 768 MB maximum_object_size_in_memory 64 MB +# Set a sensible cap on the number of open file descriptors. +# Rocky Linux 8.6 sets this to ~2^30 which results in alloc failure on start. +max_filedescriptors 10000 + # Leave coredumps in the first cache dir coredump_dir /var/spool/squid