Bug 51741

Summary: Apache is unable to handle more than 1024 fd.
Product: [Retired] Red Hat Linux Reporter: Florian Brand <fbrand>
Component: apacheAssignee: Joe Orton <jorton>
Status: CLOSED CURRENTRELEASE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: low    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-21 10:07:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.