summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2010-10-12 23:12:37 +0200
committerStefan Fritsch <sf@apache.org>2010-10-12 23:12:37 +0200
commit5bcd082e3d0d1e4a533348db6127463e96252fda (patch)
treec24d7200109eb8812eab4b2d86270ebc436a184b /server
parentRestore the apr_brigade_insert_file() call to within recall_body(), as the (diff)
downloadapache2-5bcd082e3d0d1e4a533348db6127463e96252fda.tar.xz
apache2-5bcd082e3d0d1e4a533348db6127463e96252fda.zip
Rename MaxRequestsPerChild to MaxConnectionsPerChild, which
describes more accurately what the directive does. The old name still works but logs a warning. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1021924 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r--server/core.c5
-rw-r--r--server/mpm/event/event.c4
-rw-r--r--server/mpm/winnt/child.c8
-rw-r--r--server/mpm/winnt/mpm_winnt.c2
-rw-r--r--server/mpm/worker/worker.c4
-rw-r--r--server/mpm_common.c6
6 files changed, 19 insertions, 10 deletions
diff --git a/server/core.c b/server/core.c
index b9d9c9a0ed..50f82029f7 100644
--- a/server/core.c
+++ b/server/core.c
@@ -3576,7 +3576,10 @@ AP_INIT_FLAG("SeeRequestTail", ap_set_reqtail, NULL, RSRC_CONF,
AP_INIT_TAKE1("PidFile", ap_mpm_set_pidfile, NULL, RSRC_CONF,
"A file for logging the server process ID"),
AP_INIT_TAKE1("MaxRequestsPerChild", ap_mpm_set_max_requests, NULL, RSRC_CONF,
- "Maximum number of requests a particular child serves before dying."),
+ "Maximum number of connections a particular child serves before "
+ "dying. (DEPRECATED, use MaxConnectionsPerChild)"),
+AP_INIT_TAKE1("MaxConnectionsPerChild", ap_mpm_set_max_requests, NULL, RSRC_CONF,
+ "Maximum number of connections a particular child serves before dying."),
AP_INIT_TAKE1("CoreDumpDirectory", ap_mpm_set_coredumpdir, NULL, RSRC_CONF,
"The location of the directory Apache changes to before dumping core"),
AP_INIT_TAKE1("MaxMemFree", ap_mpm_set_max_mem_free, NULL, RSRC_CONF,
diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c
index 452a67b773..b7c7c4f9e4 100644
--- a/server/mpm/event/event.c
+++ b/server/mpm/event/event.c
@@ -763,7 +763,7 @@ read_request:
}
/* requests_this_child has gone to zero or below. See if the admin coded
- "MaxRequestsPerChild 0", and keep going in that case. Doing it this way
+ "MaxConnectionsPerChild 0", and keep going in that case. Doing it this way
simplifies the hot path in worker_thread */
static void check_infinite_requests(void)
{
@@ -1779,7 +1779,7 @@ static void child_main(int child_num_arg)
else { /* !one_process */
/* remove SIGTERM from the set of blocked signals... if one of
* the other threads in the process needs to take us down
- * (e.g., for MaxRequestsPerChild) it will send us SIGTERM
+ * (e.g., for MaxConnectionsPerChild) it will send us SIGTERM
*/
unblock_signal(SIGTERM);
apr_signal(SIGTERM, dummy_signal_handler);
diff --git a/server/mpm/winnt/child.c b/server/mpm/winnt/child.c
index 469855e437..dd3a15d1dc 100644
--- a/server/mpm/winnt/child.c
+++ b/server/mpm/winnt/child.c
@@ -737,7 +737,7 @@ static unsigned int __stdcall worker_main(void *thread_num_val)
break;
}
- /* Have we hit MaxRequestsPerChild connections? */
+ /* Have we hit MaxConnectionsPerChild connections? */
if (ap_max_requests_per_child) {
requests_this_child++;
if (requests_this_child > ap_max_requests_per_child) {
@@ -1013,7 +1013,7 @@ void child_main(apr_pool_t *pconf)
*
* max_requests_per_child_event:
* This event is signaled by the worker threads to indicate that
- * the process has handled MaxRequestsPerChild connections.
+ * the process has handled MaxConnectionsPerChild connections.
*
* TIMEOUT:
* To do periodic maintenance on the server (check for thread exits,
@@ -1058,12 +1058,12 @@ void child_main(apr_pool_t *pconf)
break;
}
else {
- /* MaxRequestsPerChild event set by the worker threads.
+ /* MaxConnectionsPerChild event set by the worker threads.
* Signal the parent to restart
*/
ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, ap_server_conf,
"Child %d: Process exiting because it reached "
- "MaxRequestsPerChild. Signaling the parent to "
+ "MaxConnectionsPerChild. Signaling the parent to "
"restart a new child process.", my_pid);
ap_signal_parent(SIGNAL_PARENT_RESTART);
break;
diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c
index e2f5e444f8..197b3c77b7 100644
--- a/server/mpm/winnt/mpm_winnt.c
+++ b/server/mpm/winnt/mpm_winnt.c
@@ -701,7 +701,7 @@ static int create_process(apr_pool_t *p, HANDLE *child_proc, HANDLE *child_exit_
* translated into an ap_signal_parent(SIGNAL_PARENT_RESTART)
* call by code in service.c.
* 3. The child process calling ap_signal_parent(SIGNAL_PARENT_RESTART)
- * as a result of hitting MaxRequestsPerChild.
+ * as a result of hitting MaxConnectionsPerChild.
*
* shutdown_event
* --------------
diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c
index 7af28e7cd6..28df0637be 100644
--- a/server/mpm/worker/worker.c
+++ b/server/mpm/worker/worker.c
@@ -564,7 +564,7 @@ static void process_socket(apr_thread_t *thd, apr_pool_t *p, apr_socket_t *sock,
}
/* requests_this_child has gone to zero or below. See if the admin coded
- "MaxRequestsPerChild 0", and keep going in that case. Doing it this way
+ "MaxConnectionsPerChild 0", and keep going in that case. Doing it this way
simplifies the hot path in worker_thread */
static void check_infinite_requests(void)
{
@@ -1276,7 +1276,7 @@ static void child_main(int child_num_arg)
else { /* !one_process */
/* remove SIGTERM from the set of blocked signals... if one of
* the other threads in the process needs to take us down
- * (e.g., for MaxRequestsPerChild) it will send us SIGTERM
+ * (e.g., for MaxConnectionsPerChild) it will send us SIGTERM
*/
unblock_signal(SIGTERM);
apr_signal(SIGTERM, dummy_signal_handler);
diff --git a/server/mpm_common.c b/server/mpm_common.c
index e45a089447..044385aa66 100644
--- a/server/mpm_common.c
+++ b/server/mpm_common.c
@@ -253,6 +253,12 @@ const char *ap_mpm_set_max_requests(cmd_parms *cmd, void *dummy,
return err;
}
+ if (!strcasecmp(cmd->cmd->name, "MaxRequestsPerChild")) {
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL,
+ "MaxRequestsPerChild is deprecated, use "
+ "MaxConnectionsPerChild instead.");
+ }
+
ap_max_requests_per_child = atoi(arg);
return NULL;