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

having problem serving multitude virtualhosts


I am thinking of serving some hundreds virtualhosts
each with separate log and errorlog on PC having 768 MB RAM and 2 GB swap
using Debian Woody and debian package kernel 2.4.18.

>From some point apache didnt start, giving error like

Too many open files: unable to open a file descriptor above 15, you may
need to increase the number of descriptors

Obviously it helped to insert into the /etc/init.d/apache

ulimit -S -n 8192

And after some time we discovered that CGI scripts started to behave
strangely, giving only headers or just hanging. Anyway, in the errorlog
was different message

[Sat Jan  4 21:49:08 2003] [warn] send body: filedescriptor (1137)
larger than FD_SETSIZE (1024) found, you probably need to rebuild
Apache with a larger FD_SETSIZE

I searched the web and found out one recommendation of compiling apache
with rised DF_SETSIZE. So i added in the debian/rules the following value


And while building deb source package i recieved those warnings

gcc -c  -I../os/unix -I../include   -DLINUX=22 -DTARGET=\"apache\"
-I/usr/include/db1 -DDEV_RANDOM=/dev/random -DUSE_HSREGEX
`../apaci` ap_slack.c
In file included from /usr/include/sys/types.h:215,
                 from ../include/ap_config.h:86,
                 from ../include/httpd.h:72,
                 from ap_slack.c:67:
/usr/include/sys/select.h:77: warning: `FD_SETSIZE' redefined
*Initialization*:1: warning: this is the location of the previous

At the beginnging it seemed, these manipulations have taken care of the
problem, but before too long i noticed the same FD_SETSIZE warnings again.

Please, could you give me some advice what to do besides to distribute
virtual hosts between to servers :)

Also, i found hints from the internet that changing FD_SETSIZE aint easy
matter and actually one needs to change it systemwide?

Searching lists around httpd.apache.org i found a suggestion of writing
all logs into one place (pipe?) and sepatating them afterwards. Althought
it could be somewhat solution, is there some other
(preferrably counfigurable) way of doing it?

Best Regards, Imre Oolberg

Reply to: