Guys

Any ideas on how to set the file descriptors limit, if I am deploying
squid via rpm (redhat 9.0). I have tried using ulimit -HSn 8192 in the
install section of my squid spec file, before running configure. Then I
run the following that just restarts squid with the new set fd thing:

#!/bin/bash
PID=`(/bin/ps -d | /bin/grep 'RunCache' | /bin/gawk '{printf $1}')`
/bin/kill -TERM $PID
/usr/local/squid/sbin/squid -k kill
ulimit -HSn 8192
/usr/local/squid/bin/RunCache &

1. Do I even need to set the fd limit in the spec file, or can I do it
elsewhere?
2. How do I know if squid is actually running with the new fd limit?

Thanks a lot.

Pali

(Monday mourning)

-----Original Message-----
From: Henrik Nordstrom [mailto:[EMAIL PROTECTED] 
Sent: 13 July 2003 23:29
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [squid-users] Increasing file descriptors

On Sunday 13 July 2003 23.10, Mahmood Ahmed wrote:

> 2003/07/13 22:12:43| WARNING! Your cache is running out of
> filedescriptors
>
> so the question is "is there any way to increase the number of file
> descriptors with out rebuilding the squid." he is using redHat 8.0
> with squid2.5 Stable2. ulimit -a shows outputs the following.

No, but you can reconfigure Squid to be a little more conservative 
with the filedescriptors it has.

First try:

   half_closed_clients off

If that is not sufficient, try

   pconn_timeout 30 seconds

And if still not sufficient, try

   server_persistent_connections off

And finally, if still short

   client_persistent_connections off

Warning: the last setting is incompatible with NTLM authentication.


If may also be the case that the reason why Squid is running out of 
filedescriptors is because it runs out of time due to disk I/O 
blocking the process. If the Squid is fairly loaded (30 
request/second or more) then the "cache_dir ufs .." cache store won't 
be able to keep up and you need to use either aufs or diskd. If you 
are lucky the Squid binary you have is compiled with support for 
these (to find out, just replace ufs by aufs or diskd and run "squid 
-k parse") and in such case enabling such cache store is a matter of 
just changing squid.conf.

Regards
Henrik

-- 
Donations welcome if you consider my Free Squid support helpful.
https://www.paypal.com/xclick/business=hno%40squid-cache.org

If you need commercial Squid support or cost effective Squid or
firewall appliances please refer to MARA Systems AB, Sweden
http://www.marasystems.com/, [EMAIL PROTECTED]
Visit our website at http://www.rm.com

This message is confidential.  You should not copy it
or disclose its contents to anyone.  You may use and apply the information
only for the intended purpose.  Internet communications are not secure and
therefore RM does not accept legal responsibility for the contents of this
message.  Any views or opinions presented are only those of the author and
not those of RM.  If this email has come to you in error please delete it
and any attachments.  Please note that RM may intercept incoming and
outgoing e-mail communications.

This email has been scanned for viruses by Trend ScanMail.

Reply via email to