Fwd: varnish 2.0.4 backend errors

Lazy lazy404 at gmail.com
Wed Jul 15 12:14:21 CEST 2009


2009/7/15 Kristian Lyngstol <kristian at redpill-linpro.com>:
> On Wed, Jul 15, 2009 at 10:01:08AM +0200, Lazy wrote:
> (...)
>> setting 500 as min threads didn't make any diference, funny thing is
>> that failed requests are in logged in apache as succesful
>
> Sorry if I didn't make myself clear: The output from varnishstat didn't
> indicate that threads was the issue causing 503s. It was more of a
> tuning-comment than a shot at solving the real problem. Sorry about the
> confusion.
>
>> 09:23:50.563934 IP x.x.x.x.51235 > x.x.x.x.88: S
>> 1066103134:1066103134(0) win 32792 <mss 16396,sackOK,timestamp
>> 552835403 0,nop,wscale 7>
>
> (....)
>
> Is it possible for you to mail me the raw cap-file? (Feel free to obfuscate
> the IPs, but I'm really more of an ethereal-man than tcpdump-output...).
> Feel free to drop it directly to me, if that makes it easier.
ok, it will take a minute i have a 50MB file to chop

>
>> successful POST in apache logs,
>>
>> in varnishlog
>>
>> 14 Backend      c 15 default default
>
> (...)
>
> The request must've started earlier, as this is just the backend request.
> Do you have the entire transaction available?
yes

   14 VCL_call     c error
   14 VCL_return   c restart
   14 VCL_call     c recv
   14 VCL_return   c pass
   14 VCL_call     c pass
   14 VCL_return   c pass
   15 BackendOpen  b default xxx 51219 xxx 88
   14 Backend      c 15 default default
   15 TxRequest    b POST
   15 TxURL        b /quiz/question
   15 TxProtocol   b HTTP/1.1
   15 TxHeader     b x-requested-with: XMLHttpRequest
   15 TxHeader     b Accept-Language: pl
   15 TxHeader     b Accept: text/html, */*
   15 TxHeader     b Content-Type: application/x-www-form-urlencoded
   15 TxHeader     b UA-CPU: x86
   15 TxHeader     b Accept-Encoding: gzip, deflate
   15 TxHeader     b User-Agent: Mozilla/4.0 (compatible; MSIE 7.0;
Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)
   15 TxHeader     b X-Varnish: 782633863
   15 TxHeader     b X-Forwarded-For: 82.177.
   15 BackendClose b default
   14 VCL_call     c error
   14 VCL_return   c restart
   14 VCL_call     c recv
   14 VCL_return   c pass
   14 VCL_call     c pass
   14 VCL_return   c pass
   15 BackendOpen  b default xxx 51235 xxx 88
   14 Backend      c 15 default default

>
> (...)
>
>> restart shouldn't make another backend connection if current one got closed ?
>
> It should, but it should be noted that: 1. We don't know _why_ it fails. 2.
> Restart in vcl_error is brand new, so there might still be some issues.
>
> You could try to turn on vcl-trace. (-p vcl_trace=on).

right now i have something 100-200 req/s won't it kill the server and
I can't restart varnish now so I will have try to enable it at runtime

>
> Also, could you post your VCL in it's entirety? (If you already did, I
> must've missed it.)

backend default {
.host = "xxxx";
.port = "88";
}


sub vcl_recv {
    if (req.url ~ "\.(png|gif|jpg|swf|css|js|ico)$") {
        lookup;
    }
    if (req.url ~ "landing/") {
        lookup;
    }

    if (req.http.Cache-Control ~ "no-cache") {
     pass;
    }
}

sub vcl_fetch {
    if (req.url ~ "\.(png|gif|jpg|swf)$") {
        unset obj.http.set-cookie;
    }

    if (obj.http.Pragma ~ "no-cache" || obj.http.Cache-Control ~ "no-cache") {
     pass;
    }
}


sub vcl_error {
    if (req.restarts < 30) {
        restart;
    }
}



More information about the varnish-misc mailing list