wont server from Cache

Vitaly Burshteyn vburshteyn at broadway.com
Tue Jun 1 18:28:22 CEST 2010


Hi folks,

 

So I sent this post few days ago, I have made some changes but still
cant get my varnish box to server content from cache even though it
looks like it is:

232  Client requests received

         130  Cache hits

           5  Cache hits for pass

          97  Cache misses

          99  Backend conn. success

           3  Backend conn. failures

          99  Fetch with Length

          15  N struct sess_mem

 

 

When I shut down the web server it gives me a 503 error.

 

Here is the copy of my vcl file with out the backend info..  Any and all
suggestion would be appreciated.

 

 

sub vcl_recv {

 

#set req.backend = bw;

set req.grace = 60m;

 

if (req.request == "PURGE")

            {if (!client.ip ~ purge)

                {error 405 "Not allowed.";}

            return(lookup);}

 

 

if (req.request != "GET" && req.request != "HEAD")

           {return(lookup);}

 

 

   if (req.http.Cache-Control ~ "no-cache")

           {purge_url(req.url);}

 

return(lookup);

 

}

 

 

sub vcl_hit {

 

  if (!obj.cacheable) {

      return(pass);  }}

 

sub vcl_fetch {

    if (beresp.status == 500 || beresp.status == 503 || beresp.status ==
504) {

            restart;    }

 

        set beresp.ttl = 600s;

        set beresp.grace = 600s;

 

        if (beresp.ttl < 300s) {

          set beresp.ttl = 300s;}

        if (!beresp.cacheable)

            {return(pass);}

        if (beresp.http.Set-Cookie)

            {return(pass);}

}

 

Vitaly Burshteyn

Senior Network Engineer

Broadway.com, Theatre Direct International

729  7th Avenue

New York, New York 10019

Phone: 212.817.9117

Cell# 917-701-5732

 


____________________________________
The information contained in this transmission may contain privileged 
and confidential information.  It is intended only for the use of the 
person(s) named above. If you are not the intended recipient,  you are 
hereby notified that any review, dissemination, distribution or 
duplication of this communication is strictly prohibited. If you are 
not the intended recipient, please contact the sender by reply email 
and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20100601/8769047a/attachment-0003.html>


More information about the varnish-misc mailing list