Project

General

Profile

Bug #2132

piped accesslog is disorder when server.max-worker>1

Added by liming almost 10 years ago. Updated over 3 years ago.

Status:
Obsolete
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
2009-12-30
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:
Yes

Description

If server.max-worker >1 (e.g. 2 or 3) and pipe logging is used, for example:

server.max-worker = 4
accesslog.filename = "| /home/work/cronolog -S /home/work/lighttpd/log/access_log /home/work/lighttpd/log/access_log.%Y%m%d%H"

and use Apache ab:
./ab -c 100 -n 1000000 http://127.0.0.1:8080/index.html

you can see the accesslog is disorder:

...
127.0.0.1 - - [30/Dec/2009:17:58:39 +0800] "GET / HTTP/1.0" 200 5120 "http://test.example.com/1234567890abcdefghijklmnopqrstuvwxyz"
"ApacheBench/2.3"
127.0.0.1 - - [30/Dec/2009:17:58:39 +0800] "GET / HTTP/1.0" 200 5120 "http://test.example.com/1234567890abcdefghijklmnopqrstuvwxyz"
"ApacheBench/2.3"
127.0.0.1 - - [30/Dec/2009:17:58:39 +0800] "GET / HTTP/1.0" 200 5120 "http://test.example.com/1234567890abcdefghijklmnopqrstuvwxyz"
"ApacheBench/2.3"
T / HTTP/1.0" 200 5120 "http://test.example.com/1234567890abcdefghijklmnopqrstuvwxyz" "ApacheBench/2.3"
127.0.0.1 - - [30/Dec/2009:17:58:39 +0800] "GET / HTTP/1.0" 200 5120 "http://test.example.com/1234567890abcdefghijklmnopqrstuvwxyz"
"ApacheBench/2.3"
127.0.0.1 - - [30/Dec/2009:17:58:39 +0800] "GET / HTTP/1.0" 200 5120 "http://test.example.com/1234567890abcdefghijklmnopqrstuvwxyz"
"ApacheBench/2.3"
...
127.0.0.1 - - [30/Dec/2009:17:58:39 +0800] "GET / HTTP/1.0" 200 5120 "http://test.example.com/1234567890abcdefghijklmnopqrstuvwxyz"
"ApacheBench/2.3"
127.0.0.1 - - [30/Dec/2009:17:58:39 +0800] "GEeBench/2.3"
127.0.0.1 - - [30/Dec/2009:17:58:39 +0800] "GET / HTTP/1.0" 200 5120 "http://test.example.com/1234567890abcdefghijklmnopqrstuvwxyz"
"ApacheBench/2.3"
127.0.0.1 - - [30/Dec/2009:17:58:39 +0800] "GET / HTTP/1.0" 200 5120 "http://test.example.com/1234567890abcdefghijklmnopqrstuvwxyz"
"ApacheBench/2.3"
T / HTTP/1.0" 200 5120 "http://test.example.com/1234567890abcdefghijklmnopqrstuvwxyz" "ApacheBench/2.3"
127.0.0.1 - - [30/Dec/2009:17:58:39 +0800] "GET / HTTP/1.0" 200 5120 "http://test.example.com/1234567890abcdefghijklmnopqrstuvwxyz"
"ApacheBench/2.3"
127.0.0.1 - - [30/Dec/2009:17:58:39 +0800] "GET / HTTP/1.0" 200 5120 "http://test.example.com/1234567890abcdefghijklmnopqrstuvwxyz"
"ApacheBench/2.3"
127.0.0.1 - - [30/Dec/2009:17:58:39 +0800] "GET / HTTP/1.0" 200 5120 "http://test.example.com/1234567890abcdefghijklmnopqrstuvwxyz"
"ApacheBench/2.3"
...

It's because mod_accesslog.c has a bug in line 870:
870 (p->conf.access_logfile->used && p->conf.access_logfile->ptr0 != '|') || /* pipes don't cache */

=>

(p->conf.access_logfile->used && p->conf.access_logfile->ptr0 == '|') || /* pipes don't cache */

It's ok now.

mod_accesslog.patch (541 Bytes) mod_accesslog.patch liming, 2009-12-30 10:18

History

#1

Updated by liming almost 10 years ago

  • Status changed from New to Patch Pending
#2

Updated by liming almost 10 years ago

this patch is for lighttpd 1.5

#3

Updated by stbuehler almost 10 years ago

  • Target version set to 1.5.0
#4

Updated by gstrauss almost 4 years ago

This is correct in 1.4.x latest.

1.5.x branch has been abandoned. Please withdraw ticket.

#5

Updated by gstrauss over 3 years ago

  • Missing in 1.5.x changed from No to Yes
#6

Updated by gstrauss over 3 years ago

  • Status changed from Patch Pending to Obsolete

Also available in: Atom