[Varnish] #151: Varnish delivers always the same file
Varnish
varnish-bugs at projects.linpro.no
Tue Aug 21 16:57:43 CEST 2007
#151: Varnish delivers always the same file
---------------------+------------------------------------------------------
Reporter: greenad | Owner: des
Type: defect | Status: new
Priority: high | Milestone:
Component: build | Version: 1.1
Severity: blocker | Keywords: 1.1.1
---------------------+------------------------------------------------------
Hi I am using Varnish 1.0.4 without any problems. But 1.1/1.1.1 behave
strange - for some reasons they always deliver the first fetched file ...
over and over again.
starting varnish
{{{
/usr/local/bin/varnishd -a 0.0.0.0:8080 -n /var/varnish -f
/etc/varnish/default.net.vcl -t 120s -s
file,/var/lib/varnish/varnish_storage.bin,10m
}}}
config
{{{
acl purge {
"127.0.0.1";
}
backend default {
set backend.host = "127.0.0.1";
set backend.port = "80";
}
sub vcl_recv {
if (req.request != "GET" && req.request != "HEAD") {
if (req.request == "PURGE") {
if (!client.ip ~ purge) {
error 405 "Not allowed.";
}
lookup;
}
pipe;
}
if (req.http.Expect) {
pipe;
}
if (req.http.Authenticate || req.http.Authorization) {
pass;
}
lookup;
}
sub vcl_pipe {
pipe;
}
sub vcl_pass {
pass;
}
sub vcl_hash {
hash;
}
sub vcl_hit {
if (req.request == "PURGE") {
set obj.ttl = 0s;
error 200 "Purged.";
}
if (!obj.cacheable) {
pass;
}
deliver;
}
sub vcl_miss {
if (req.request == "PURGE") {
error 404 "Not in cache.";
}
fetch;
}
sub vcl_fetch {
if (req.http.Set-Cookie) {
insert;
}
if (obj.ttl < 120s) {
set obj.ttl = 120s;
}
if (!obj.valid) {
error;
}
if (!obj.cacheable) {
pass;
}
insert;
}
sub vcl_timeout {
discard;
}
}}}
varnishlog
{{{
11 SessionOpen c 89.59.113.78 61274
11 ReqStart c 89.59.113.78 61274 1832852093
11 RxRequest c GET
11 RxURL c /photos/100.jpg
11 RxProtocol c HTTP/1.1
11 RxHeader c Host: img.page.test:8080
11 RxHeader c User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1;
de; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
11 RxHeader c Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
11 RxHeader c Accept-Language: de-de,en-us;q=0.8,de;q=0.5,en;q=0.3
11 RxHeader c Accept-Encoding: gzip,deflate
11 RxHeader c Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
11 RxHeader c Keep-Alive: 300
11 RxHeader c Connection: keep-alive
11 RxHeader c Pragma: no-cache
11 RxHeader c Cache-Control: no-cache
11 VCL_call c recv
11 VCL_return c lookup
11 VCL_call c hash
11 VCL_return c hash
11 Hit c 1832852090
11 VCL_call c hit
11 VCL_return c deliver
11 Length c 185835
11 VCL_call c deliver
11 VCL_return c deliver
11 TxProtocol c HTTP/1.1
11 TxStatus c 200
11 TxResponse c OK
11 TxHeader c Expires: Fri, 24 Aug 2007 14:48:03 GMT
11 TxHeader c Content-Type: image/jpeg
11 TxHeader c Date: Tue, 21 Aug 2007 14:48:03 GMT
11 TxHeader c Server: image_server
11 TxHeader c Content-Length: 185835
11 TxHeader c X-Varnish: 1832852093 1832852090
11 TxHeader c Age: 91
11 TxHeader c Via: 1.1 varnish
11 TxHeader c Connection: keep-alive
11 ReqEnd c 1832852093 1187707778.423660994 1187707778.424011946
0.041718960 0.000022888 0.000328064
0 StatAddr 89.59.113.78 0 91 2 2 0 0 1 494 371670
0 CLI Rd ping
0 CLI Wr 0 200 PONG 1187707781
11 TxHeader c Connection: keep-alive
11 ReqEnd c 1832852094 1187707802.443674088 1187707802.444056034
0.091289043 0.000030994 0.000350952
0 StatAddr 89.59.113.78 0 115 3 3 0 0 1 748 557505
11 ReqStart c 89.59.113.78 61276 1832852095
11 RxRequest c GET
11 RxURL c /photos/6639575.jpg
11 RxProtocol c HTTP/1.1
11 RxHeader c Host: img.page.test:8080
11 RxHeader c User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1;
de; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
11 RxHeader c Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
11 RxHeader c Accept-Language: de-de,en-us;q=0.8,de;q=0.5,en;q=0.3
11 RxHeader c Accept-Encoding: gzip,deflate
11 RxHeader c Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
11 RxHeader c Keep-Alive: 300
11 RxHeader c Connection: keep-alive
11 VCL_call c recv
11 VCL_return c lookup
11 VCL_call c hash
11 VCL_return c hash
11 Hit c 1832852090
11 VCL_call c hit
11 VCL_return c deliver
11 Length c 185835
11 VCL_call c deliver
11 VCL_return c deliver
11 TxProtocol c HTTP/1.1
11 TxStatus c 200
11 TxResponse c OK
11 TxHeader c Expires: Fri, 24 Aug 2007 14:48:03 GMT
11 TxHeader c Content-Type: image/jpeg
11 TxHeader c Date: Tue, 21 Aug 2007 14:48:03 GMT
11 TxHeader c Server: image_server
11 TxHeader c Content-Length: 185835
11 TxHeader c X-Varnish: 1832852095 1832852090
11 TxHeader c Age: 116
11 TxHeader c Via: 1.1 varnish
11 TxHeader c Connection: keep-alive
11 ReqEnd c 1832852095 1187707803.618964911 1187707803.619365931
1.174908876 0.000022173 0.000378847
0 StatAddr 89.59.113.78 0 116 3 4 0 0 1 1002 743340
0 CLI Rd ping
0 CLI Wr 0 200 PONG 1187707805
11 SessionOpen c 89.59.113.78 61277
11 ReqStart c 89.59.113.78 61277 1832852096
11 RxRequest c GET
11 RxURL c /photos/6639575.jpg
11 RxProtocol c HTTP/1.1
11 RxHeader c Host: img.page.test:8080
11 RxHeader c User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1;
de; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
11 RxHeader c Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
11 RxHeader c Accept-Language: de-de,en-us;q=0.8,de;q=0.5,en;q=0.3
11 RxHeader c Accept-Encoding: gzip,deflate
11 RxHeader c Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
11 RxHeader c Keep-Alive: 300
11 RxHeader c Connection: keep-alive
11 RxHeader c Cache-Control: max-age=0
11 VCL_call c recv
11 VCL_return c lookup
11 VCL_call c hash
11 VCL_return c hash
11 Hit c 1832852090
11 VCL_call c hit
11 VCL_return c deliver
11 Length c 185835
11 VCL_call c deliver
11 VCL_return c deliver
11 TxProtocol c HTTP/1.1
11 TxStatus c 200
11 TxResponse c OK
11 TxHeader c Expires: Fri, 24 Aug 2007 14:48:03 GMT
11 TxHeader c Content-Type: image/jpeg
11 TxHeader c Date: Tue, 21 Aug 2007 14:48:03 GMT
11 TxHeader c Server: image_server
11 TxHeader c Content-Length: 185835
11 TxHeader c X-Varnish: 1832852096 1832852090
11 TxHeader c Age: 149
11 TxHeader c Via: 1.1 varnish
11 TxHeader c Connection: keep-alive
11 ReqEnd c 1832852096 1187707836.168909073 1187707836.169548035
0.123310089 0.000025988 0.000612974
0 StatAddr 89.59.113.78 0 149 4 5 0 0 1 1256 929175
0 CLI Rd ping
0 CLI Wr 0 200 PONG 1187707838
0 CLI Rd ping
0 CLI Wr 0 200 PONG 1187707841
11 SessionClose c timeout
11 StatSess c 89.59.113.78 61277 0 1 1 0 0 0 254 185835
11 SessionOpen c 89.59.113.78 61280
11 ReqStart c 89.59.113.78 61280 1832852097
11 RxRequest c GET
11 RxURL c /photos/2609215.jpg
11 RxProtocol c HTTP/1.1
11 RxHeader c Host: img.page.test:8080
11 RxHeader c User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1;
de; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
11 RxHeader c Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
11 RxHeader c Accept-Language: de-de,en-us;q=0.8,de;q=0.5,en;q=0.3
11 RxHeader c Accept-Encoding: gzip,deflate
11 RxHeader c Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
11 RxHeader c Keep-Alive: 300
11 RxHeader c Connection: keep-alive
11 VCL_call c recv
11 VCL_return c lookup
11 VCL_call c hash
11 VCL_return c hash
11 Hit c 1832852090
11 VCL_call c hit
11 VCL_return c deliver
11 Length c 185835
11 VCL_call c deliver
11 VCL_return c deliver
11 TxProtocol c HTTP/1.1
11 TxStatus c 200
11 TxResponse c OK
11 TxHeader c Expires: Fri, 24 Aug 2007 14:48:03 GMT
11 TxHeader c Content-Type: image/jpeg
11 TxHeader c Date: Tue, 21 Aug 2007 14:48:03 GMT
11 TxHeader c Server: image_server
11 TxHeader c Content-Length: 185835
11 TxHeader c X-Varnish: 1832852097 1832852090
11 TxHeader c Age: 185
11 TxHeader c Via: 1.1 varnish
11 TxHeader c Connection: keep-alive
11 ReqEnd c 1832852097 1187707872.356697083 1187707872.357018948
0.030522108 0.000023842 0.000298023
0 StatAddr 89.59.113.78 0 185 5 6 0 0 1 1510 1115010
}}}
so matter what kind of GET request ... i always get back the content of
100.jpg (the first fetched file after varnish was started)
--
Ticket URL: <http://varnish.projects.linpro.no/ticket/151>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list