cache/503
Rob S
rtshilston at gmail.com
Wed Jun 2 20:40:46 CEST 2010
If you send the output of varnishlog from one working and one
non-working browser, with the back end shutdown, then we might be able
to spot the difference.
Rob
vitaly burshteyn wrote:
> Hi folks,
>
> Just curious if you can point me in the right direction.
>
> I have 2.0.6 varnish running. So it seems as if the cache is working
> and i am getting cache hits.
>
> When i shut down the back end i can still get to the cached pages.
>
> On the other hand when i try a new browser i keep getting 503 pages.
>
> Any ideas?
>
>
>
> backend default {
> .host = "10.249.129.171";
> .port = "80"; }
>
> sub vcl_recv {
> unset req.http.cookie;
>
> if (req.url ~ "^/admin/"){
> set req.url = regsub(req.url, "^/admin/", "/oops/"); }
>
> if (req.url ~ "/affiliates/visa-signature/") {
> return(pass); }
>
> if (req.http.cookie) {
> set req.http.Cookie = regsuball(req.http.Cookie, "__utm.=[^;]+(;
> )?", "");
> if (req.http.cookie ~ "^ *$") {
> remove req.http.cookie; } }
>
> if (req.url ~ "^/r/\d+/") {
> return(pass); }
>
> # Don't cache if specific HTTP headers exist
> if (req.http.Expect) {
> return(pass); }
>
> if (req.http.Authorization) {
> return(pass); }
> return(lookup);}
>
> sub vcl_deliver {
> return (deliver);}
>
> sub vcl_fetch {
> set obj.ttl = 120m;
>
> unset obj.http.set-cookie;
> if (req.url ~ "^/$") {
> set obj.ttl = 1800s;}
>
> # Don't cache error pages
> if (obj.status == 503) {
> return(pass); }
>
> if (obj.http.Vary == "Cookie") {
> remove obj.http.Vary;
> }
> if (obj.http.Vary == "Cookie,Accept-Encoding") {
> set obj.http.Vary = "Accept-Encoding"; }
>
> # Anti-dogpiling feature - serve a stale request until a new one
> # can be fetched, for up to 30s
>
> if (!obj.cacheable) {
> return(pass); }
>
> return(deliver);}
>
> sub vcl_hit {
> remove obj.http.Set-Cookie;}
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> http://lists.varnish-cache.org/mailman/listinfo/varnish-misc
More information about the varnish-misc
mailing list