Re: fix(?) for Solaris 2.5, running out of filedescriptors.

From: Stewart Forster <slf@dont-contact.us>
Date: Fri, 29 Nov 1996 09:06:30 +1100

> On Nov 28, Anthony Baxter wrote:
> > Hi folks -
> > I've got a fix/workaround for getting squid to use more than 1024 fds
> > on Solaris 2.5. The problem is with the select() call, which, in Solaris,
> > is just a wrapper around poll(). I wrote my own select() call (which calls
> > poll()) and set it to use up to 4096 filedescriptors. According to Sun,
> > various kernel thingys go byebyes when you push it any higher than that.
>
> Ah ha. The problem with select is mentioned in the solaris faq re:
> increasing file descriptors, which I did include in my reply to Stewart
> on squid-users some time ago.
>
> Presumably, you tried setting FD_SETSIZE before including <sys/types.h>
> as documented in the select man page? Or is this the big 'doesn't work
> as documented' bug in solaris?

        Both true. The documentation they provide is WRONG! You can set
FS_SETSIZE, but the array size compiled into select() is still only 1024 FD's
in length. Then it's a case of `Do I corrupt my internal data or not?' kind
of hit/miss thingy.

        Cheers,

                Stew.

-- 
Stewart Forster (Security and Web Proxy Cache Administrator)
connect.com.au pty ltd, Level 9, 114 Albert Rd, Sth Melbourne, VIC 3205, Aust.
Email: slf@connect.com.au   Phone: +61 3 9251-3684   Fax: +61 3 9251-3666
Received on Thu Nov 28 1996 - 14:17:25 MST

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