Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 40823 invoked by uid 500); 16 Jun 2000 17:39:58 -0000 Mailing-List: contact new-httpd-help@apache.org; run by ezmlm Precedence: bulk X-No-Archive: yes Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list new-httpd@apache.org Received: (qmail 40615 invoked from network); 16 Jun 2000 17:39:41 -0000 Sender: greg@raleigh.ibm.com Message-ID: <394A6619.AA99C0C@raleigh.ibm.com> Date: Fri, 16 Jun 2000 13:38:34 -0400 From: Greg Ames X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.14-15mdk i686) X-Accept-Language: en MIME-Version: 1.0 To: new-httpd@apache.org Subject: [PATCH] fix error msgs when mpm hard limits are exceeded Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N If you try to set the number of threads or processes in your config file higher than the HARD_{SERVER ,THREAD}_LIMIT in mpm_default.h, you get an error message telling you to look at the hard limits in src/include/httpd.h (which was correct for 1.3). This patch changes the text to point you to the correct file. I'm generating the filename string for all mpm's in a common place so that if the hard limits happen to move again, it will be a piece o' cake to change the message. Greg Index: configure.in =================================================================== RCS file: /home/cvs/apache-2.0/src/configure.in,v retrieving revision 1.59 diff -u -d -b -w -r1.59 configure.in --- configure.in 2000/06/12 23:34:23 1.59 +++ configure.in 2000/06/16 17:12:04 @@ -186,6 +186,7 @@ echo "#define HTTPD_ROOT \"$prefix\"" >> ${path_h}.new echo "#define SUEXEC_BIN \"$bindir/suexec\"" >> ${path_h}.new echo "#define SERVER_CONFIG_FILE \"conf/$progname.conf\"" >> ${path_h}.new +echo "#define APACHE_MPM_DIR \"$mpmdir\"" >> ${path_h}.new cmp ${path_h}.new ${path_h} >/dev/null 2>&1 if test $? -ne 0 ; then @@ -201,6 +202,7 @@ exec_prefix=$exec_prefix bindir=$bindir progname=$progname +mpmdir=$MPM_DIR ]) AC_TYPE_RLIM_T Index: include/mpm_common.h =================================================================== RCS file: /home/cvs/apache-2.0/src/include/mpm_common.h,v retrieving revision 1.2 diff -u -d -b -w -r1.2 mpm_common.h --- include/mpm_common.h 2000/05/24 00:41:58 1.2 +++ include/mpm_common.h 2000/06/16 17:12:04 @@ -77,6 +77,8 @@ void ap_reclaim_child_processes(int terminate); void ap_wait_or_timeout(ap_wait_t *status, ap_proc_t *ret, ap_pool_t *p); +#define ap_mpm_hard_limits_file "src/" APACHE_MPM_DIR "/mpm_default.h" + #ifdef __cplusplus } #endif Index: modules/mpm/dexter/dexter.c =================================================================== RCS file: /home/cvs/apache-2.0/src/modules/mpm/dexter/dexter.c,v retrieving revision 1.95 diff -u -d -b -w -r1.95 dexter.c --- modules/mpm/dexter/dexter.c 2000/06/12 23:02:55 1.95 +++ modules/mpm/dexter/dexter.c 2000/06/16 17:12:04 @@ -1312,7 +1312,8 @@ " lowering NumServers to %d. To increase, please " "see the", HARD_SERVER_LIMIT); ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, - " HARD_SERVER_LIMIT define in src/include/httpd.h."); + " HARD_SERVER_LIMIT define in %s.", + ap_mpm_hard_limits_file); num_daemons = HARD_SERVER_LIMIT; } else if (num_daemons < 1) { @@ -1340,7 +1341,8 @@ "lowering StartThreads to %d. To increase, please" "see the", HARD_THREAD_LIMIT); ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, - "HARD_THREAD_LIMIT define in src/include/httpd.h."); + " HARD_THREAD_LIMIT define in %s.", + ap_mpm_hard_limits_file); } else if (threads_to_start < 1) { ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, Index: modules/mpm/mpmt_beos/mpmt_beos.c =================================================================== RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c,v retrieving revision 1.33 diff -u -d -b -w -r1.33 mpmt_beos.c --- modules/mpm/mpmt_beos/mpmt_beos.c 2000/06/14 00:17:21 1.33 +++ modules/mpm/mpmt_beos/mpmt_beos.c 2000/06/16 17:12:04 @@ -1030,7 +1030,8 @@ " lowering MaxClients to %d. To increase, please " "see the", HARD_SERVER_LIMIT); ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, - " HARD_SERVER_LIMIT define in src/include/httpd.h."); + " HARD_SERVER_LIMIT define in %s.", + ap_mpm_hard_limits_file); ap_daemons_limit = HARD_SERVER_LIMIT; } else if (ap_daemons_limit < 1) { @@ -1058,7 +1059,8 @@ " lowering ThreadsPerChild to %d. To increase, please" "see the", HARD_THREAD_LIMIT); ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, - " HARD_THREAD_LIMIT define in src/include/httpd.h."); + " HARD_THREAD_LIMIT define in %s.", + ap_mpm_hard_limits_file); } else if (ap_threads_per_child < 1) { ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, Index: modules/mpm/mpmt_pthread/mpmt_pthread.c =================================================================== RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c,v retrieving revision 1.88 diff -u -d -b -w -r1.88 mpmt_pthread.c --- modules/mpm/mpmt_pthread/mpmt_pthread.c 2000/06/12 23:02:57 1.88 +++ modules/mpm/mpmt_pthread/mpmt_pthread.c 2000/06/16 17:12:04 @@ -1386,7 +1386,8 @@ " lowering MaxClients to %d. To increase, please " "see the", HARD_SERVER_LIMIT); ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, - " HARD_SERVER_LIMIT define in src/include/httpd.h."); + " HARD_SERVER_LIMIT define in %s.", + ap_mpm_hard_limits_file); ap_daemons_limit = HARD_SERVER_LIMIT; } else if (ap_daemons_limit < 1) { @@ -1413,7 +1414,8 @@ " lowering ThreadsPerChild to %d. To increase, please" "see the", HARD_THREAD_LIMIT); ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, - " HARD_THREAD_LIMIT define in src/include/httpd.h."); + " HARD_THREAD_LIMIT define in %s.", + ap_mpm_hard_limit_file); } else if (ap_threads_per_child < 1) { ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, Index: modules/mpm/prefork/prefork.c =================================================================== RCS file: /home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v retrieving revision 1.101 diff -u -d -b -w -r1.101 prefork.c --- modules/mpm/prefork/prefork.c 2000/06/12 23:02:58 1.101 +++ modules/mpm/prefork/prefork.c 2000/06/16 17:12:04 @@ -1728,7 +1728,8 @@ " lowering MaxClients to %d. To increase, please " "see the", HARD_SERVER_LIMIT); ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, - " HARD_SERVER_LIMIT define in src/include/httpd.h."); + " HARD_SERVER_LIMIT define in %s.", + ap_mpm_hard_limits_file); ap_daemons_limit = HARD_SERVER_LIMIT; } else if (ap_daemons_limit < 1) { Index: modules/mpm/spmt_os2/spmt_os2.c =================================================================== RCS file: /home/cvs/apache-2.0/src/modules/mpm/spmt_os2/spmt_os2.c,v retrieving revision 1.44 diff -u -d -b -w -r1.44 spmt_os2.c --- modules/mpm/spmt_os2/spmt_os2.c 2000/06/12 18:07:40 1.44 +++ modules/mpm/spmt_os2/spmt_os2.c 2000/06/16 17:12:04 @@ -1575,7 +1575,8 @@ " lowering MaxClients to %d. To increase, please " "see the", HARD_SERVER_LIMIT); ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, - " HARD_SERVER_LIMIT define in src/include/httpd.h."); + " HARD_SERVER_LIMIT define in %s.", + ap_mpm_hard_limits_file); ap_daemons_limit = HARD_SERVER_LIMIT; } else if (ap_daemons_limit < 1) { Index: modules/mpm/winnt/mpm_winnt.c =================================================================== RCS file: /home/cvs/apache-2.0/src/modules/mpm/winnt/mpm_winnt.c,v retrieving revision 1.78 diff -u -d -b -w -r1.78 mpm_winnt.c --- modules/mpm/winnt/mpm_winnt.c 2000/06/12 18:07:43 1.78 +++ modules/mpm/winnt/mpm_winnt.c 2000/06/16 17:12:04 @@ -2209,8 +2209,8 @@ HARD_THREAD_LIMIT); ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, " lowering ThreadsPerChild to %d. To increase, please" - " see the HARD_THREAD_LIMIT define in src/include/httpd.h.", - HARD_THREAD_LIMIT); + " see the HARD_THREAD_LIMIT define in %s.", + HARD_THREAD_LIMIT, ap_mpm_hard_limits_file); } else if (ap_threads_per_child < 1) { ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,