RE: [squid-users] file descriptor problem

From: SXB6300 Mailing <SXB6300@dont-contact.us>
Date: Mon, 7 Jun 2004 08:52:16 +0200

Hi,

Something more simple : modify directly squid sources.
Go to src/ and open main.c ; look for
"if (Fnd D_SETSIZE < Squid_MaxFD)
        Squid_MaxFD = FD_SETSIZE;"
and add
"Squid_MaxFD = the_number_of_file_descriptor_you_want;"
below.
Note that when you'll compile it, you'll still get :
checking Default FD_SETSIZE value... 1024
checking Maximum number of filedescriptors we can open... 1024
(1024 beeing my default value).
Dont forget to add ulimit -Hsn in squid's startup script (as said
int the faq), start squid and then check in cachemgr (in General
runtime info). It should be ok.

        P-E

-----Message d'origine-----
De : Hement Gopal [mailto:hementg@cns.wits.ac.za]
Envoyé : vendredi 4 juin 2004 12:32
À : squid-users
Objet : Re: [squid-users] file descriptor problem

Muthukumar wrote:

>>i ran this command again, verified with ulimit -HSn (correct output)
>>recompiled, and still got the ff warning
>>
>>
>
> Okie. Did you change the contents of the /usr/include/bits/types.h
file for _FD_SETSIZE value.
>

here's teh funnt bit

i see both a types.h file and a typesizes.h file

the SETSIZE option appears in the typesizes.h file which i have edited
already
[root@athena2 bits]# grep SETSIZE typesizes.h
#define __FD_SETSIZE 1024
define __FD_SETSIZE 32768

but i also inserted this entry in types.h file even though it shouldn't
be there ( i think)...but it made no difference

[root@athena2 bits]# grep SETSIZE types.h
define __FD_SETSIZE 32768

>
>>checking Default FD_SETSIZE value... 256
>>checking Maximum number of filedescriptors we can open... 256
>>WARNING: 256 may not be enough filedescriptors if your
>> cache will be very busy. Please see the FAQ page
>> http://www.squid-cache.org/FAQ/FAQ-11.html#filedescriptors
>> on how to increase your filedescriptor limit
>>
>
> Which linux you are using (#uname -a). I hope you are compiling and
logged as root.
> Check the configuration informations for limits of the user on
/etc/security/limits.conf file.
>

Linux athena2.wits.ac.za 2.4.20-31.9smp #1 SMP Tue Apr 13 17:40:10 EDT
2004 i686 i686 i386 GNU/Linux

and yes i am running everything as root

here is my limits.conf file

[root@athena2 security]# more limits.conf
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain> <type> <item> <value>
#
#Where:
#<domain> can be:
# - an user name
# - a group name, with @group syntax
# - the wildcard *, for default entry
#
#<type> can have the two values:
# - "soft" for enforcing the soft limits
# - "hard" for enforcing hard limits
#
#<item> can be one of the following:
# - core - limits the core file size (KB)
# - data - max data size (KB)
# - fsize - maximum filesize (KB)
# - memlock - max locked-in-memory address space (KB)
# - nofile - max number of open files
# - rss - max resident set size (KB)
# - stack - max stack size (KB)
# - cpu - max CPU time (MIN)
# - nproc - max number of processes
# - as - address space limit
# - maxlogins - max number of logins for this user
# - priority - the priority to run user process with
# - locks - max number of file locks the user can hold
#
#<domain> <type> <item> <value>
#

#* soft core 0
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4

# End of file

>
>>i'm getting desperate :(
>>
>
> It will be getting solved soon :)

i hope so :(....thanks for your help muthukumar

>
>
> Regards,
> Muthukumar.
>
>
>
> ---
> =============== It is a "Virus Free Mail" ===============
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.698 / Virus Database: 455 - Release Date: 6/2/2004
>
>
>
Received on Mon Jun 07 2004 - 00:52:22 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Jul 01 2004 - 12:00:02 MDT