[Varnish] #1131: Strange bug with if/lookup - else/pass in vcl_recv
Varnish
varnish-bugs at varnish-cache.org
Wed May 9 17:17:17 CEST 2012
#1131: Strange bug with if/lookup - else/pass in vcl_recv
-------------------------+--------------------------------------------------
Reporter: Guillaume.S | Type: defect
Status: new | Priority: normal
Milestone: | Component: varnishd
Version: 3.0.2 | Severity: normal
Keywords: |
-------------------------+--------------------------------------------------
Hello,
I have a strange bug with my vcl_recv :
if(req.url ~ \.(png|gif|jpg|jpeg|css|js|PNG|GIF|JPG|JPEG|CSS|JS)$"){
std.syslog(6, "++ RECV_IMG OK : "+req.http.host + req.url +" -- IP
CLIENT : "+req.http.remote-ip);
return (lookup);
} else {
std.syslog(6, "++ !RECV_NO-IMG : "+req.http.host + req.url +" --
IP CLIENT : "+req.http.remote-ip);
return (pass);
}
if i do a request in .php, i lost some time my cookie in response
(the cookie disappear and our LB can't send the request to the good
backend, so i have a new session on an other backend)
I see the request use the "else/pass" way in the logs.
But if i change "lookup" by "pass" in the "if", i did'nt loose the cookie
anymore.
if(req.url ~ \.(png|gif|jpg|jpeg|css|js|PNG|GIF|JPG|JPEG|CSS|JS)$"){
std.syslog(6, "++ RECV_IMG OK : "+req.http.host + req.url +" -- IP
CLIENT : "+req.http.remote-ip);
return (pass);
} else {
std.syslog(6, "++ !RECV_NO-IMG : "+req.http.host + req.url +" --
IP CLIENT : "+req.http.remote-ip);
return (pass);
}
I always see the request use the "else/pass" way in the logs.
Why my request was affected by the "if/lookup" ?
I have this bug only when the server receive 20/30 requests/sec.
With 2/3 requests, no bugs ...
The server isn't loaded (2 x 8 Core, Load ~0.07) and i have free memory
(malloc 44GB for Varnish / 48GB on server, i don't use more than 1.5GB
today)
--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1131>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list