Re: FILE DESCRIPTORS ON LINUX!!!

From: Joe Cooper <joe@dont-contact.us>
Date: Thu, 08 Jun 2000 02:50:02 -0500

Network Admin wrote:
>
> Hi
> am using squid 2.3stable 2 on redhat 6.1 on an intel machine.
> Problem is i get the file descriptor full errors , my squid is running
> currently on default 1024.
> As per faq 11, i have changed the entries
>
> /proc/sys/fs/file-max
> /proc/sys/fs/inode-max
>
> echo 4096 > /proc/sys/fs/file-max
>
> and have defined the value of
>
> OPEN_MAX in /usr/include/linux/limits.h
>
> as well, i compiled the squid2.3stable2 again but gives me same 1024 limit
>
> WHAT AM I MISSING HERE ? NEED URGENT HELP !!!

For your kernel (all kernels above 2.2.11), you need to edit:

/usr/include/bits/types.h

The line is:

#define __FD_SETSIZE 1024

Change it to whatever you want. This is where Squid finds out what the
system limits are when configuring. Also you will need to set the shell
limits in the same shell you use for compiling like so:

ulimit -HSn 4096

The ulimit command also needs to be in your Squid startup script
(/etc/rc.d/init.d/squid on Red Hat) so that the limit is raised before
Squid starts.

You do not need to recompile your kernel...only Squid.

I think that's all you need to do. It's been a while since I've fought
with that problem. Hope this helps.
                                 --
                    Joe Cooper <joe@swelltech.com>
                Affordable Web Caching Proxy Appliances
                       http://www.swelltech.com
Received on Thu Jun 08 2000 - 01:54:47 MDT

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