Bug #2132
closedpiped accesslog is disorder when server.max-worker>1
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
Updated by gstrauss almost 9 years ago
This is correct in 1.4.x latest.
1.5.x branch has been abandoned. Please withdraw ticket.
Updated by gstrauss over 8 years ago
- Status changed from Patch Pending to Obsolete
Also available in: Atom