Bug 51741 - Apache is unable to handle more than 1024 fd.
Summary: Apache is unable to handle more than 1024 fd.
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: apache   
(Show other bugs)
Version: 7.1
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Joe Orton
QA Contact: David Lawrence
Depends On:
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:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-21 10:07:44 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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:

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.