httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfcl...@apache.org
Subject svn commit: r1092076 - in /httpd/httpd/trunk/modules/proxy: ajp_link.c mod_proxy_ajp.c
Date Thu, 14 Apr 2011 09:36:14 GMT
Author: jfclere
Date: Thu Apr 14 09:36:14 2011
New Revision: 1092076

URL: http://svn.apache.org/viewvc?rev=1092076&view=rev
Log:
try to prevent a single long request marking a worker in error.

Modified:
    httpd/httpd/trunk/modules/proxy/ajp_link.c
    httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c

Modified: httpd/httpd/trunk/modules/proxy/ajp_link.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/ajp_link.c?rev=1092076&r1=1092075&r2=1092076&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/ajp_link.c (original)
+++ httpd/httpd/trunk/modules/proxy/ajp_link.c Thu Apr 14 09:36:14 2011
@@ -84,7 +84,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 (status == APR_TIMEUP ? APR_TIMEUP : AJP_ENO_HEADER);
     }
 
     status = ajp_msg_check_header(msg, &blen);

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c?rev=1092076&r1=1092075&r2=1092076&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c Thu Apr 14 09:36:14 2011
@@ -336,6 +336,15 @@ static int ap_proxy_ajp_request(apr_pool
                      "proxy: read response failed from %pI (%s)",
                      conn->worker->cp->addr,
                      conn->worker->s->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 (status == APR_TIMEUP && 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 send it



Mime
View raw message