Project

General

Profile

Actions

Bug #727

closed

Another syslog newline issue.

Added by Anonymous about 18 years ago. Updated over 8 years ago.

Status:
Invalid
Priority:
Normal
Category:
mod_accesslog
Target version:
-
ASK QUESTIONS IN Forums:

Description

What

When writing logs to syslog under high load (constantly 200req/s) its very often that log lines aren't split (are send as one). If I dont use syslog, everthing works fine.

Fixing tries

Maybe its something related to antother newline bugs? Or its a kind of buffer-flushing bug? Applying/hacking around #481 doesn't help.

Versions, environment

  • 1.4.8
  • 1.4.x-svn versions
  • max-worker=16 setting (number of lighttpd processes).

Example

Here is an example line (yes, its one line, first date is by syslog-ng, next dates are sent by lighttpd, additional two minuses signs, are our X-LIGHTTPD headers, omitting it doesnt help)


Jun 27 23:59:59 s_dgram@nw12.EXAMPLE.COM lighttpd[3570]: 192.168.2.108 w8.EXAMPLE.COM - [27/Jun/2006:23:59:59 +0200] "GET /sfs0/194/183/gallery-1292973-500x500.jpg HTTP/1.1" 200 33932 "http://w8.EXAMPLE.COM/gallery/10978/6/" "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4" - - 192.168.1.113 w8.EXAMPLE.COM - [27/Jun/2006:23:59:59 +0200] "GET /sfs75/119/70/gallery-3784431-150x150.jpg HTTP/1.0" 200 4902 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.7.8) Gecko/20050511 Firefox/1.0.4" - - 192.168.1.107 w8.EXAMPLE.COM - [27/Jun/2006:23:59:59 +0200] "GET /sfs75/146/40/gallery-3960380-150x150.jpg HTTP/1.0" 304 0 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)" - - 192.168.1.107 w8.EXAMPLE.COM - [27/Jun/2006:23:59:59 +0200] "GET /sfs75/60/244/gallery-4013040-150x150.jpg HTTP/1.0" 200 8862 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" - - 192.168.1.105 w8.EXAMPLE.COM - [27/Jun/2006:23:59:59 +0200] "GET /sfs75/190/71/gallery-3742604-150x150.jpg HTTP/1.0" 304 0 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)" - - 192.168.1.106 w8.EXAMPLE.COM - [27/Jun/2006:23:59:59 +0200] "GET /sfs75/126/76/gallery-3731602-150x150.jpg HTTP/1.0" 200 4485 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)" - - 192.168.1.113 w8.EXAMPLE.COM - [27/Jun/2006:23:59:59 +0200] "GET /sfs75/138/130/gallery-3865250-150x150.jpg HTTP/1.0" 200 4860 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Neostrada Plus 5.6)" - - 192.168.1.106 w8.EXAMPLE.COM - [27/Jun/2006:23:59:59 +0200] "GET /sfs75/80/100/avatar-86414.gif HTTP/1.0" 304 0 "http://w8.EXAMPLE.COM/comm/fl/" "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; cw-mep2000-retail)" - - 192.168.1.113 w8.EXAMPLE.COM - [27/Jun/2006:23:59:59 +0200] "GET /sfs75/190/140/gallery-3584630-150x150.jpg HTTP/1.0" 200 5987 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" - - 192.168.1.111 w8.EXAMPLE.COM - [27/Jun/2006:23:59:59 +0200] "GET /sfs75/229/180/gallery-3556190-150x150.jpg HTTP/1.0" 304 0 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" - - 192.168.1.113 w8.EXAMPLE.COM - [27/Jun/2006:23:59:59 +0200] "GET /sfs75/15/156/gallery-3357247-150x150.jpg HTTP/1.0" 200 7701 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4" - - 192.168.1.108 w8.EXAMPLE.COM - [27/Jun/2006:23:59:59 +0200] "GET /s/ico/arr.gif HTTP/1.1" 200 363 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; pl) Opera 8.50" - - 192.168.1.113 w8.EXAMPLE.COM - [27/Jun/2006:23:59:59 +0200] "GET /sfs75/221/158/avatar-1415340.gif HTTP/1.0" 200 2524 "http://w8.EXAMPLE.COM/comm/fl/435360/3/0/2006-02-11%2019:57:54.013311/1/" "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4" - - 192.168.1.108 w8.EXAMPLE.COM - [27/Jun/2006:23:59:59 +0200] "GET /sfs75/53/135/avatar-3939843.gif HTTP/1.1" 200 2984 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; pl) Opera 8.50" - - 192.168.1.108 w8.EXAMPLE.COM - [27/Jun/2006:23:59:59 +0200] "GET /s/js/ac/builder.js HTTP/1.1" 200 3361 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)" - -

-- mpulczynski

Actions #1

Updated by Anonymous about 18 years ago

Funniest thing is I am filtering logs using regexes to not include statics, eg


accesslog.use-syslog = "disable" 
$HTTP["url"] !~ "\.(jpg|gif|png|jpeg|css|swf)$" {
   accesslog.use-syslog = "enable" 
}

which works fine when I am not using syslog, but, as seen in an example in ticket, doesnt work for syslog.

-- mpulczynski

Actions #2

Updated by gstrauss over 8 years ago

This is a very old ticket which is marked High Priority.

This is unlikely to still be an issue since the current lighttpd log.c writes the log line into a single buffer, encoding any control chars (including any newlines), and then sends the buffer to syslog() in a single call.

Actions #3

Updated by stbuehler over 8 years ago

  • Description updated (diff)
  • Status changed from New to Invalid
  • Assignee deleted (jan)
  • Priority changed from High to Normal

Actually mod_accesslog has its own logging functions, but they too send each line as a separate syslog() call (pipe loggers get flushed on each entry too), and this should have been that way since 2005. Maybe the syslog implementation screwed this up...

Also no support for max-workers > 0.

Actions

Also available in: Atom