Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Varnish: Bugs

#1131: Strange bug with if/lookup - else/pass in vcl_recv

 

 

Varnish bugs RSS feed   Index | Next | Previous | View Threaded


varnish-bugs at varnish-cache

May 9, 2012, 8:17 AM

Post #1 of 4 (331 views)
Permalink
#1131: Strange bug with if/lookup - else/pass in vcl_recv

#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

_______________________________________________
varnish-bugs mailing list
varnish-bugs [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs


varnish-bugs at varnish-cache

May 14, 2012, 3:32 AM

Post #2 of 4 (316 views)
Permalink
Re: #1131: Strange bug with if/lookup - else/pass in vcl_recv [In reply to]

#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: |
-------------------------+--------------------------------------------------

Comment(by kristian):

It's a bit unclear what, precisely, the problem is.

Can you attach varnishlog output of the problem, please?

Also: Are you missing Cookie headers, Set-Cookie headers or something
else? Which precise cookies are you missing, and when? (In relation to the
varnishlog output).

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1131#comment:1>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs


guillaume.szkopinski at ovh

May 14, 2012, 4:41 AM

Post #3 of 4 (269 views)
Permalink
Re: #1131: Strange bug with if/lookup - else/pass in vcl_recv [In reply to]

Hi !

It's done, we found how fix it.

Our infrastructure :
VH : Varnish
ACE : Cisco ACE
WEBS : Thousand web servers (Apache)
WEBX : web server

Step by step :
1° VH <-> ACE <-> WEBS
2° VH --> ACE (Cookie? Yes:Set-Cookie=$cookie,
No:Set-Cookie=newcookie()) --> WEBX
3° VH --- ACE Transparent mode --> WEBX
4° VH <-- ACE Transparent mode --- WEBX

Some responses were back from backend to VH without "Set-Cookie" field.
Web servers had keep-alive enable, so when VH reuse connections, step2
was ignored.

We had disable keep-alive connections on web servers, and all is fine :)

Guile.


On 05/14/12 12:32, Varnish wrote:
> #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: |
> -------------------------+--------------------------------------------------
>
> Comment(by kristian):
>
> It's a bit unclear what, precisely, the problem is.
>
> Can you attach varnishlog output of the problem, please?
>
> Also: Are you missing Cookie headers, Set-Cookie headers or something
> else? Which precise cookies are you missing, and when? (In relation to the
> varnishlog output).
>
>

_______________________________________________
varnish-bugs mailing list
varnish-bugs [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs


varnish-bugs at varnish-cache

Jul 30, 2012, 8:24 AM

Post #4 of 4 (270 views)
Permalink
Re: #1131: Strange bug with if/lookup - else/pass in vcl_recv [In reply to]

#1131: Strange bug with if/lookup - else/pass in vcl_recv
-------------------------+-------------------------
Reporter: Guillaume.S | Owner:
Type: defect | Status: closed
Priority: normal | Milestone:
Component: varnishd | Version: 3.0.2
Severity: normal | Resolution: worksforme
Keywords: |
-------------------------+-------------------------
Changes (by phk):

* status: new => closed
* resolution: => worksforme


Comment:

Hi !

It's done, we found how fix it.

Our infrastructure :
VH : Varnish
ACE : Cisco ACE
WEBS : Thousand web servers (Apache)
WEBX : web server

Step by step :
1° VH <-> ACE <-> WEBS
2° VH --> ACE (Cookie? Yes:Set-Cookie=$cookie,
No:Set-Cookie=newcookie()) --> WEBX
3° VH --- ACE Transparent mode --> WEBX
4° VH <-- ACE Transparent mode --- WEBX

Some responses were back from backend to VH without "Set-Cookie" field.
Web servers had keep-alive enable, so when VH reuse connections, step2
was ignored.

We had disable keep-alive connections on web servers, and all is fine :)

Guile.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1131#comment:2>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs

Varnish bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.