Re: [squid-users] Squid is running out of filedescriptors in MacO SX Server!

From: Campbell, Shawn <scampbell@dont-contact.us>
Date: Fri, 17 Oct 2003 11:22:25 -0400

When you run the configure script, what numbers are reported to you for
the lines below:

checking Default FD_SETSIZE value... 1024
checking Maximum number of filedescriptors we can open... 1024

If the bottom one is 32768, then squid was compiled in with support for
up to that many open files.

I typically have to use the ulimit command before I run the configure
script to change the maximum number of open files the shell permits. I
have to be root to make that change so I usually su up to root, run
ulimit and then su back to the user I want to compile the program as.
That way, my ulimit settings are inherited by the non-root user. There
probably is a better way, but that is what I do. I use bash as my shell
(a linux environment). Given the unix heritage of OS X server, the
shell you are using should permit a similar kind of operation. I use
ulimit -n 8192 (man bash in case you have bash) in my shell. I also
include the ulimit command in the script I use to start squid. ulimit
-a reports the current shell limits for all "tweakable" parameters. As
you have stated, you can find out how many file descriptors squid can
use by checking cache.log. I typically use the --enable-poll option in
the configure script since "select" is only good up to 1024 file
descriptors on linux. I would check the output of configure to see if
you are using poll, if not, it might be wise to force it with
--enable-poll. I don't know much about the state of the network lib on
mac os x, since it is based on BSD, I presume it has good poll support.
Maybe it just isn't being detected properly by configure. So forcing it
may be a good idea.

As for commercial support, I know that http://squid.visolve.com/
provides payed support for squid. You might know about them already,
but I thought I would include it for completeness.

Shawn

On Fri, 2003-10-17 at 10:45, MM wrote:
> Hi again!
>
> It's seems that noone on this list have a clue about this. But does
> anyone know where you can turn to get some answers? Are there other
> resources? Are there consultants that are experts in Squid? Yes we can
> pay for some support. I guess this is the downside of Open Source...
>
> Getting desperate... Are using Squid in production...
>
> /Micke Moggia
>
>
> fredagen den 17 oktober 2003 kl 01.38 skrev MM:
>
> > Hi all!
> >
> > Have seen in the FAQ and also in the mailarchives that running out
> of
> > filedescriptors is not very uncommon. But I haven't seen anyone
> > writing about this issue in Mac OSX Server.
> >
> > We run Squid as a http-accelerator and when our webserver is very
> > busy, Squid keeps saying:
> > WARNING! Your cache is running out of filedescriptors
> >
> > In Mac OS X Server when you run the command sysctl -a you see that:
> > kern.maxfiles = 32768
> >
> > That is also recognized by Squid when you ./configure:
> > checking Maximum number of filedescriptors we can open...
> 32768
> >
> > But the funny thing, is that when you start Squid, you see in the
> > cache-log:
> > With 1024 file descriptors available
> >
> > So, the problem here seems that Squid "forgets" that it has 32768
> > filedescriptors when running...
> >
> > Can anyone advise?
> >
> > Regards,
> > Micke Moggia
> >
>
Received on Fri Oct 17 2003 - 09:22:38 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:20:31 MST