On Wed, Mar 25, 2009 at 07:14:45PM +0300, Sergei Kononov wrote:
> Update:
>
> Well, I spent almost whole day to figure out why this problem happend. As I
> mentioned earlier the most strange thing is missing log entries for 404 in
> varnishlog (but they are seen in tcpdump). I tried few modifications to
> vcl_recv and noticed that if remove "pipe" from:
> if ( req.url ~ "^/api/.*" ) {
> set req.backend = b2;
> set req.url = regsub(req.url, "^/api/", "/")
> set req.http.X-Cacheable = "false";
> pipe; # ---> remove it
> }
>
> Everything start to working fine. It's really strange behavior and
> almost unpredictable. I suppose there is some bug in parsing of VCL or
> something related to vcl anyway.
The "pipe" makes all subsequent requests on the same TCP connection go to the
same backend unaltered. When you use "pipe", it's just a stream of bytes
between the client and the backend. Add:
sub vcl_pipe {
set req.http.connection = "close";
}
A comment have been added to sub vcl_pipe in the default VCL in trunk regarding
this issue, see around line 64 in:
http://varnish.projects.linpro.no/browser/trunk/varnish-cache/bin/varnishd/default.vcl
--
Stig Sandbeck Mathisen
Senior systemadministrator, leder faggruppe nettverk
Redpill Linpro AS - Changing the Game
signature.asc
Description: Digital signature
_______________________________________________ varnish-misc mailing list [email protected] http://projects.linpro.no/mailman/listinfo/varnish-misc
