Bug 51741 - Apache is unable to handle more than 1024 fd.
Summary: Apache is unable to handle more than 1024 fd.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: apache
Version: 7.1
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Joe Orton
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-08-14 16:32 UTC by Florian Brand
Modified: 2007-03-27 03:48 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-09-21 10:07:44 UTC
Embargoed:


Attachments (Terms of Use)

Description Florian Brand 2001-08-14 16:32:48 UTC
Description of problem:
Apache is compiled with a FD_SIZE of 1024. If you have many virtual hosts (
510+) with seperate log files all filedescriptors are used for the log
files. ( ulimit -H -n 8000, so the kernel is not the problem)

Apache can request more fds from the kernel and for the logfiles it does
work. However for allocating the sockets Apache checks FD_SIZE and dies.


How reproducible:
Always

Steps to Reproduce:
1. Create let4s say 100 virtual hosts with seperate log files.
2. try to start apache
	

Actual Results:  No open sockets, Apache dead.

Expected Results:  Apache available.

Additional info:

This problem occurs of course only for larger ISPs.
since ulimits protects the system perfectly IMHO the FD_SIZE limit can be
removed entirely 
or at least enlarged to a higher value, or set dynamicly acording to the
actual ulimit/max_files settings of the kernel

Comment 1 Florian Brand 2001-08-15 16:37:28 UTC
mmm, typo in the original bug form.
Actually it is FD_SETSIZE that is offending.
Comes from /usr/include/linux/posix_types.h __FD_SET_SIZE

Comment 2 Joe Orton 2004-09-21 10:07:44 UTC
Thanks for the report.  This bug is no longer present in the Apache
httpd 2.0 packages in Red Hat Enterprise Linux and Fedora Core.


Note You need to log in before you can comment on or make changes to this bug.