[Varnish] #1437: varnish ESI randomly fetches whole page from backend even if present in cache

Varnish varnish-bugs at varnish-cache.org
Sun Feb 23 19:32:59 CET 2014


#1437: varnish ESI randomly fetches whole page from backend even if present in
cache
------------------------+---------------------
 Reporter:  charanjeet  |       Type:  defect
   Status:  new         |   Priority:  highest
Milestone:              |  Component:  build
  Version:  unknown     |   Severity:  normal
 Keywords:              |
------------------------+---------------------
 On refreshing the page, Varnish ESI is randomly fetching page from backend
 even if it was present in cache and it leaves nothing in varnishlog. After
 few refreshes, it again starts picking the cached page.

 I haven't set grace value.

 {{{

     sub vcl_recv {
            if (req.http.Cookie ~ "(LoggedIn)") {
                     if (req.url ~ "CACHEABLE"){
                             return (lookup);
                     }
                     if (req.url ~ "ESI")
                     {
                             return (pass);
                     }
                     return (pipe);
             }
            set req.http.Cookie = regsuball(req.http.Cookie, "(^|; )
 *__utm.=[^;]+;? *", "\1");

     }

     sub vcl_fetch {

            if (req.http.Cookie ~ "(LoggedIn)") {
             if (req.url ~ "CACHEABLE"){
                     set beresp.do_esi = true;
                     set beresp.ttl = 1m;
             }
             return(deliver);
     }

 }}}

     Can this be related to no of threads varnish can create?

     I read that while one object is being fetched from cache, if more
 requests pile up for for same object, they all wait for the first request
 to complete. It could be that probably this is not working.

     I also found an issue on varnish saying that varnishd sends multiple
 requests to the backend when an object times out.

 [https://www.varnish-cache.org/trac/ticket/1340]

 I am not able to make out some pattern for requests going to backend.
 Please suggest. Any insight would definitely help.

-- 
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1437>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator




More information about the varnish-bugs mailing list