Project

General

Profile

Feature #652

Log remote IP for message "request timed out after writing..."

Added by chernousov about 11 years ago. Updated over 1 year ago.

Status:
Fixed
Priority:
Normal
Assignee:
Category:
core
Target version:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Missing in 1.5.x:

Description

Something like this would be very useful:

in server.c


xHome src # svn diff server.c
Index: server.c
===================================================================
--- server.c    (revision 1126)
+++ server.c    (working copy)
@@ -1144,7 +1144,8 @@
                                                if (srv->cur_ts - con->write_request_ts > con->conf.max_write_idle) {
                                                        /* time - out */
 #if 1
-                                                       log_error_write(srv, __FILE__, __LINE__, "sbsosds",
+                                                       log_error_write(srv, __FILE__, __LINE__, "ssbsosds",
+                                                                       inet_ntop_cache_get_ip(srv, &(con->dst_addr)),
                                                                        "NOTE: a request for",
                                                                        con->request.uri,
                                                                        "timed out after writing",

Associated revisions

Revision 3109 (diff)
Added by stbuehler over 1 year ago

[core] log remote address on request timeouts (fixes #652)

From: Stefan Bühler <>

Revision 06005655 (diff)
Added by stbuehler over 1 year ago

[core] log remote address on request timeouts (fixes #652)

From: Stefan Bühler <>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3109 152afb58-edef-0310-8abb-c4023f1b3aa9

History

#1 Updated by gstrauss over 1 year ago

Trivial patch

diff --git a/src/server.c b/src/server.c
index 26ecbcc..39a8407 100644
--- a/src/server.c
+++ b/src/server.c
@@ -1343,8 +1343,10 @@ int main (int argc, char **argv) {
                                                if (srv->cur_ts - con->write_request_ts > con->conf.max_write_idle) {
                                                        /* time - out */
                                                        if (con->conf.log_timeouts) {
-                                                               log_error_write(srv, __FILE__, __LINE__, "sbsosds",
-                                                                       "NOTE: a request for",
+                                                               log_error_write(srv, __FILE__, __LINE__, "sbsbsosds",
+                                                                       "NOTE: a request from",
+                                                                       con->dst_addr_buf,
+                                                                       "for",
                                                                        con->request.uri,
                                                                        "timed out after writing",
                                                                        con->bytes_written,

#2 Updated by stbuehler over 1 year ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset r3109.

Also available in: Atom