From 9acbe090dbb5aae6f7e19247abf514867230a04b Mon Sep 17 00:00:00 2001 From: Brian Pane Date: Sun, 14 Jul 2002 23:18:45 +0000 Subject: [PATCH] Increase the per-process file descriptor limit in apachectl for the benefit of people running multithreaded MPMs or lots of vhosts git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96053 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ support/apachectl.in | 6 ++++++ support/config.m4 | 6 ++++++ 3 files changed, 15 insertions(+) diff --git a/CHANGES b/CHANGES index 765bac06a4..184dd8516b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 2.0.40 + *) Increase the limit on file descriptors per process in apachectl. + [Brian Pane] + *) Fix a dependency error when building ApacheMonitor, so that Win32 and MSVC now trust that the project is current (when it is). [James Cox ] diff --git a/support/apachectl.in b/support/apachectl.in index 91f1a6fe10..356ca3c326 100644 --- a/support/apachectl.in +++ b/support/apachectl.in @@ -44,9 +44,15 @@ LYNX="lynx -dump" # have one, then status and fullstatus will not work. STATUSURL="http://localhost:@PORT@/server-status" # +# the command to increase the limit on open file descriptors +ULIMIT_MAX_FILES="@APACHECTL_ULIMIT@" # -------------------- -------------------- # |||||||||||||||||||| END CONFIGURATION SECTION |||||||||||||||||||| +if [ "x$ULIMIT_MAX_FILES" != "x" ] ; then + $ULIMIT_MAX_FILES +fi + ERROR=0 if [ "x$ARGV" = "x" ] ; then ARGV="-h" diff --git a/support/config.m4 b/support/config.m4 index 5dd691f89e..ad52a8c03c 100644 --- a/support/config.m4 +++ b/support/config.m4 @@ -81,3 +81,9 @@ fi ]) APACHE_SUBST(checkgid_LTFLAGS) +if TMP_ULIMIT=`ulimit -H -n` && ulimit -S -n $TMP_ULIMIT ; then + APACHECTL_ULIMIT="ulimit -S -n \`ulimit -H -n\`" +else + APACHECTL_ULIMIT="" +fi +APACHE_SUBST(APACHECTL_ULIMIT) -- 2.50.1