Try to prevent a single long request marking a worker in error.
Submitted by: jfclere
Reviewd by: jfclere, rjung, rpluem
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@
1227298 13f79535-47bb-0310-9956-
ffa450edef68
*) mod_log_config: Fix segfault when logging nameless, valueless cookie.
PR 52256. [Stefan Fritsch]
+ *) mod_proxy_ajp: Try to prevent a single long request from marking a worker
+ in error. [Jean-Frederic Clere]
+
*) config: Update the default mod_ssl configuration: Disable SSLv2, only
allow >= 128bit ciphers, add commented example for speed optimized cipher
list, limit MSIE workaround to MSIE <= 5. [Kaspar Brand]
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- * mod_proxy_ajp: try to prevent a single long request marking a worker in error.
- Trunk version of patch:
- http://svn.apache.org/viewvc?view=revision&revision=r1092076
- http://svn.apache.org/viewvc?view=revision&revision=r1100513
- http://people.apache.org/~jfclere/patches/ajp_timeout.patch
- +1: jfclere, rjung, rpluem
-
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
if (status != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, status, NULL,
"ajp_ilink_receive() can't receive header");
- return AJP_ENO_HEADER;
+ return (APR_STATUS_IS_TIMEUP(status) ? APR_TIMEUP : AJP_ENO_HEADER);
}
status = ajp_msg_check_header(msg, &blen);
"proxy: read response failed from %pI (%s)",
conn->worker->cp->addr,
conn->worker->hostname);
+
+ /* If we had a successful cping/cpong and then a timeout
+ * we assume it is a request that cause a back-end timeout,
+ * but doesn't affect the whole worker.
+ */
+ if (APR_STATUS_IS_TIMEUP(status) && conn->worker->ping_timeout_set) {
+ return HTTP_GATEWAY_TIME_OUT;
+ }
+
/*
* This is only non fatal when we have not sent (parts) of a possible
* request body so far (we do not store it and thus cannot sent it