You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2010/03/05 04:57:23 UTC

DO NOT REPLY [Bug 39785] Status code 408 (Request Timeout) is not logged

https://issues.apache.org/bugzilla/show_bug.cgi?id=39785

--- Comment #2 from Mark Montague <ma...@umich.edu> 2010-03-05 03:57:21 UTC ---
Created an attachment (id=25086)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25086)
Prevent excessive 408 log entries when KeepAlive is on

When KeepAlive is on, the original patch results in a log entry for every
connection, reporting when the keepalive times out.  This results in a large
number of 408 status codes in the logs, one for each legitimate connection. 
The attached patch (also included below) prevents keepalive-related 408 status
codes from being logged while still logging 408 status codes for non-keepalive
connections, header timeouts (regardless of whether keepalive is enabled), and
so on.

diff -up httpd-2.3.5-alpha/server/protocol.c.keepalivequiet
httpd-2.3.5-alpha/server/protocol.c
--- httpd-2.3.5-alpha/server/protocol.c.keepalivequiet  2010-03-04
19:50:04.321471001 -0500
+++ httpd-2.3.5-alpha/server/protocol.c 2010-03-04 21:33:52.657724234 -0500
@@ -923,7 +923,12 @@ request_rec *ap_read_request(conn_rec *c
         }
         else if (r->status == HTTP_REQUEST_TIME_OUT) {
             ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r);
-            ap_run_log_transaction(r);
+            csd = ap_get_module_config(conn->conn_config, &core_module);
+            apr_socket_timeout_get(csd, &cur_timeout);
+            if (conn->keepalive != AP_CONN_KEEPALIVE 
+                || cur_timeout != conn->base_server->keep_alive_timeout) {
+                ap_run_log_transaction(r);
+            }
             apr_brigade_destroy(tmp_bb);
             goto traceout;
         }

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org