Re: File Descriptors and squid

From: Dancer <>
Date: Sat, 17 Oct 1998 16:21:19 +1000

Matthew Lowe wrote:
> Recently everyones been going on about the FD limit problem with
> squid, this problem has recently occured to our proxy server.
> I have obtained the patch, applied it successfully I believe,
> changed the limit to 3000 whilst doing make menuconfig, recompiled
> the kernel, installed the new kernel and rebooted.
> Now what do I need to change next? I've picked up bits and pieces from
> various emails but am unsure what exactly I should be doing.
> Would someone kindly be able to post a short description of what to do
> next, or where I can find the information I need.
> Thanks,
> - Matthew Lowe
> Dataline Tech Support

Depending on the patch you used:

1. Make sure that /usr/include/gnu/types.h has the value for
__FD_SETSIZE that is reported by /usr/include/linux/fs.h (you want
either 3072 or 4096 for 3000fds, depending on which patch you used)
2. Go to the top of your squid source-tree and 'rm config.cache', then
type 'ulimit -n 3000', then run configure with your usual options.
3. Make sure that FD_SETSIZE is reported correctly by configure. If it
isn't, you'll likely blow squid up at some point. It must match the
kernel's notion. (You can probably get by if it thinks it's larger than
the kernel does...if squid thinks it's smaller, stuff is likely to go
4. 'make clean', then rebuild squid.
5. Modify your startup script so that it runs 'ulimit -n 3000' before
running squid. Put that in your RunCache, perhaps.
6. Relax. Everything will work.

Received on Sat Oct 17 1998 - 00:16:06 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:42:32 MST