httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1227298 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS modules/proxy/ajp_link.c modules/proxy/mod_proxy_ajp.c
Date Wed, 04 Jan 2012 20:15:29 GMT
Author: sf
Date: Wed Jan  4 20:15:28 2012
New Revision: 1227298

URL: http://svn.apache.org/viewvc?rev=1227298&view=rev
Log:
Merge r1092076, r1100513:

Try to prevent a single long request marking a worker in error.

Submitted by: jfclere
Reviewd by: jfclere, rjung, rpluem

Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/modules/proxy/ajp_link.c
    httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_ajp.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=1227298&r1=1227297&r2=1227298&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Wed Jan  4 20:15:28 2012
@@ -14,6 +14,9 @@ Changes with Apache 2.2.22
   *) 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]

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=1227298&r1=1227297&r2=1227298&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Wed Jan  4 20:15:28 2012
@@ -92,13 +92,6 @@ RELEASE SHOWSTOPPERS:
 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 ]
 

Modified: httpd/httpd/branches/2.2.x/modules/proxy/ajp_link.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/proxy/ajp_link.c?rev=1227298&r1=1227297&r2=1227298&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/proxy/ajp_link.c (original)
+++ httpd/httpd/branches/2.2.x/modules/proxy/ajp_link.c Wed Jan  4 20:15:28 2012
@@ -95,7 +95,7 @@ apr_status_t ajp_ilink_receive(apr_socke
     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);

Modified: httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_ajp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_ajp.c?rev=1227298&r1=1227297&r2=1227298&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_ajp.c (original)
+++ httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_ajp.c Wed Jan  4 20:15:28 2012
@@ -337,6 +337,15 @@ static int ap_proxy_ajp_request(apr_pool
                      "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



Mime
View raw message