Re: Out of filedescriptors

From: Nigel Metheringham <>
Date: Fri, 22 Nov 1996 12:04:44 +0000

} > Does anyone has experiance in how to increase the maximum number of
} > open filedescriptors from 256 to 2048. I know this has to be some changes
} > in kernel sources and recompilation.

For a 2.0.x kernel it can be changed by modding the sysctl file in

you should just be able to do
        echo 2048 >/proc/sys/kernel/file-max

and there should be no need for a recompile.

However the libraries need to allocate a large enough structure for fdset
- which *could* be done by having you allocating a bigger chunk and
casting it to an fdset without hacking your include files... and using the
right values in the select call.

It would be possible to have squid (or other code) read
/proc/sys/kernel/file-max and then build an fdset of appropriate size and
use that.... this obviously stops working if you don't compile in proc
support, but surely no one is that sick!


[   - Unix Applications Engineer ]
[ *Views expressed here are personal and not supported by PLAnet* ]
[ PLAnet Online : The White House          Tel : +44 113 251 6012 ]
[ Melbourne Street, Leeds LS2 7PS UK.      Fax : +44 113 2345656  ]
Received on Fri Nov 22 1996 - 04:16:51 MST

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