Project

General

Profile

Actions

Bug #2132

closed

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

Added by liming over 14 years ago. Updated almost 8 years ago.

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

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.


Files

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

Updated by liming over 14 years ago

  • Status changed from New to Patch Pending
Actions #2

Updated by liming over 14 years ago

this patch is for lighttpd 1.5

Actions #3

Updated by stbuehler over 14 years ago

  • Target version set to 1.5.0
Actions #4

Updated by gstrauss about 8 years ago

This is correct in 1.4.x latest.

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

Actions #5

Updated by gstrauss almost 8 years ago

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

Updated by gstrauss almost 8 years ago

  • Status changed from Patch Pending to Obsolete
Actions

Also available in: Atom