Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Dec 2001 02:56:34 -0800 (PST)
From:      Mark Tinka <aknit444@yahoo.com>
To:        Girnet Vladimir <VGirnet@megadat.com>, "'questions@freebsd.org'" <questions@freebsd.org>
Subject:   RE: squid + files descriptors
Message-ID:  <20011201105634.59694.qmail@web20905.mail.yahoo.com>
In-Reply-To: <8E9035BABCA0514EB0E574B6A7082FC305308D@sln01.megadat.com>

next in thread | previous in thread | raw e-mail | index | archive | help
this has something to do with your ulimit .. i am not
sure how it's done on FreeBSD, as i am running my
Squid server on SuSE Linux .. but, in Linux, there is
a file called /usr/include/bits/types.h .. which has
this field..

/* Number of descriptors that can fit in an `fd_set'. 
*/
#define __FD_SETSIZE    1024

this is the default setting.. what u need to do is up
this number to say 8192... after u save the file, u
need to run the command

ulimit -HSn 8192 

in the shell the squid starts in... it would be better
for u to put this command in a startup script, in a
shell environment u reckon squid will start up,
otherwise the shell won't pick up the new FDs and
thus, won't pass them on to servers running in that
shell, ie Squid...

but, as i said, this is on Linux, i am not sure how
this can be done on FreeBSD...

good luck..

AKNIT




--- Girnet Vladimir <VGirnet@megadat.com> wrote:
> Devin, I thnik You don't understand me.
> 
> The computers are indentical, and runs as proxy
> servers, but in different
> environment (networks). 
> 
> The problem is, that squid does not get more than
> 1064 file descriptors on
> the second machine, on the same configuration.
> 
> I don't understand this...why in kernel is set 16424
> files, that can be
> open, but squid found only 4136, or 1064 ?
> 
> thanks
> 
> > > Hi
> > > 
> > > I have been setup absolut identically hosts with
> FreeBSD 
> > 4.4-RELEASE to run
> > > SQUID 2.4 on them.
> > > 
> > > But on one host I got this warning:
> > > " WARNING! Your cache is running out of
> filedescriptors" , 
> > and squid is not
> > > working.
> > > 
> > > When I compare both cache.log files I found this
> difference: 
> > >  on first machine:
> > >  With 4136 file descriptors available
> > > 
> > >  on second machine:
> > >  With 1064 file descriptors available
> > > 
> > > I set up same configuration of kernel on both
> computers, 
> > with MAXUSERS=128,
> > > and:
> > >  
> > > kern.maxvnodes: 72477
> > > kern.maxproc: 8212
> > > kern.maxfiles: 16424
> > > kern.maxfilesperproc: 16424
> > > kern.maxprocperuid: 8211
> > > 
> > > Please, help to solve this problem! Why so
> little file descriptors?
> > > 
> > > 
> > > Regards,
> > > Vladimir Girnet
> > > Network & System Engineer NOC "MOLDOVA-ON-LINE"
> NET
> > > mailto:vgirnet@megadat.com
> > > www.mdl.net
> > > 
> > 
> > If the two machines are actually in production, it
> sounds like the one
> > is caching more files than the other.
> > 
> > fix it by issuing as root
> sysctl=kern.maxfiles=32768
> > 
> > --devin
> > 
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of
> the message


__________________________________________________
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011201105634.59694.qmail>