cache/503
vitaly burshteyn
vburshteyn at gmail.com
Wed Jun 2 20:32:15 CEST 2010
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;}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.varnish-cache.org/pipermail/varnish-misc/attachments/20100602/2e40edcc/attachment.html>
More information about the varnish-misc
mailing list