From 973c011cb7040a7a414f0c222b9d661fb11a03e6 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Wed, 21 Jun 2000 13:15:30 +0000 Subject: [PATCH] Fix error messages issued from MPMs which explain where to change compiled-in limits (e.g., ThreadsPerChild, MaxClients, StartTreads). missing: the same minor changes for the 2nd BeOS MPM Submitted by: Greg Ames Reviewed by: Jeff Trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85645 13f79535-47bb-0310-9956-ffa450edef68 --- configure.in | 2 ++ include/mpm_common.h | 2 ++ server/mpm/dexter/dexter.c | 12 +++++++----- server/mpm/mpmt_beos/mpmt_beos.c | 6 ++++-- server/mpm/mpmt_pthread/mpmt_pthread.c | 8 +++++--- server/mpm/prefork/prefork.c | 3 ++- server/mpm/spmt_os2/spmt_os2.c | 3 ++- server/mpm/winnt/mpm_winnt.c | 4 ++-- 8 files changed, 26 insertions(+), 14 deletions(-) diff --git a/configure.in b/configure.in index 405791bc71..31f1cbf479 100644 --- a/configure.in +++ b/configure.in @@ -186,6 +186,7 @@ echo '/* Generated by configure */' > ${path_h}.new 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 @@ prefix=$prefix exec_prefix=$exec_prefix bindir=$bindir progname=$progname +mpmdir=$MPM_DIR ]) AC_TYPE_RLIM_T diff --git a/include/mpm_common.h b/include/mpm_common.h index 0e83e8a597..6611c02a5c 100644 --- a/include/mpm_common.h +++ b/include/mpm_common.h @@ -77,6 +77,8 @@ extern "C" { 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 diff --git a/server/mpm/dexter/dexter.c b/server/mpm/dexter/dexter.c index 0a5bfc3393..fae1df0366 100644 --- a/server/mpm/dexter/dexter.c +++ b/server/mpm/dexter/dexter.c @@ -1312,7 +1312,8 @@ static const char *set_num_daemons (cmd_parms *cmd, void *dummy, const char *arg " 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) { @@ -1334,13 +1335,14 @@ static const char *set_threads_to_start (cmd_parms *cmd, void *dummy, const char if (threads_to_start > HARD_THREAD_LIMIT) { ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, "WARNING: StartThreads of %d exceeds compile time" - "limit of %d threads,", threads_to_start, + " limit of %d threads,", threads_to_start, HARD_THREAD_LIMIT); ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, - "lowering StartThreads to %d. To increase, please" - "see the", HARD_THREAD_LIMIT); + " 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, diff --git a/server/mpm/mpmt_beos/mpmt_beos.c b/server/mpm/mpmt_beos/mpmt_beos.c index fc4b7b73cb..adc0538681 100644 --- a/server/mpm/mpmt_beos/mpmt_beos.c +++ b/server/mpm/mpmt_beos/mpmt_beos.c @@ -1030,7 +1030,8 @@ static const char *set_server_limit (cmd_parms *cmd, void *dummy, char *arg) " 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 @@ static const char *set_threads_per_child (cmd_parms *cmd, void *dummy, char *arg " 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, diff --git a/server/mpm/mpmt_pthread/mpmt_pthread.c b/server/mpm/mpmt_pthread/mpmt_pthread.c index da17520c10..e86c3c357a 100644 --- a/server/mpm/mpmt_pthread/mpmt_pthread.c +++ b/server/mpm/mpmt_pthread/mpmt_pthread.c @@ -1391,7 +1391,8 @@ static const char *set_server_limit (cmd_parms *cmd, void *dummy, " 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) { @@ -1417,9 +1418,10 @@ static const char *set_threads_per_child (cmd_parms *cmd, void *dummy, 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); + " 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, diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 3e01e824f8..e75a65a8ef 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -1728,7 +1728,8 @@ static const char *set_server_limit (cmd_parms *cmd, void *dummy, const char *ar " 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) { diff --git a/server/mpm/spmt_os2/spmt_os2.c b/server/mpm/spmt_os2/spmt_os2.c index 783fadbc06..79d4eef48c 100644 --- a/server/mpm/spmt_os2/spmt_os2.c +++ b/server/mpm/spmt_os2/spmt_os2.c @@ -1575,7 +1575,8 @@ static const char *set_server_limit (cmd_parms *cmd, void *dummy, char *arg) " 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) { diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index b1738ff44c..6eb513f99d 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -2209,8 +2209,8 @@ static const char *set_threads_per_child (cmd_parms *cmd, void *dummy, char *arg 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, -- 2.40.0