[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#330105: libc6-dev: __FD_SETSIZE equals to 1024 is too small



tag 330105 + wontfix
severity 330105 wishlist
thanks

On Mon, Sep 26, 2005 at 06:51:19AM +0700, Damir R. Islamov wrote:
> Package: libc6-dev
> Version: 2.3.5-6
> Severity: normal
> Tags: patch
> 
> 
> In a web server with ore than 1000 Virtual Hosts in /var/log/apache2/error.log
> could be seen multiple strings with
> 
> ====================
> Segmentation fault (11)
> 
> [warn] make_sock: problem listening on port 443, file descriptor (1068) larger 
> than FD_SETSIZE (1024)
> ====================
> 
> The solution is editing __FD_SETSIZE value in /usr/include/bits/typesizes.h:
> from
> #define __FD_SETSIZE 1024
> to
> #define __FD_SETSIZE 32768
> (value must be much greater than current one 1024) and rebuilding apache, 
> sometime php,
> openssl etc.
> 
> Please make default value of __FD_SETSIZE greater than now.

  that's not the right fix. Many syscalls won't work correctly if you
change that (select e.g.). If you need to use more than 1024 open file
descriptors in an application, you have to explicitely support it, as
POSIX does not allow you to do sth like that with select and friends.

  Poll can though. epoll too.

  I also have a hard time understanding why having 1000+ virtualhosts in
apache would create such problems (except if you listen of 1000+
different ports btw, but I don't think it would be a very clever setup
anyway :])

Cheers,
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

Attachment: pgpdltghXDUTV.pgp
Description: PGP signature


Reply to: