[Varnish] #964: varnish is loosing session data

Varnish varnish-bugs at varnish-cache.org
Tue Jul 19 18:04:39 CEST 2011


#964: varnish is loosing session data
------------------------+---------------------------------------------------
 Reporter:  pravenjohn  |        Type:  defect  
   Status:  new         |    Priority:  high    
Milestone:              |   Component:  build   
  Version:  3.0.0       |    Severity:  critical
 Keywords:              |  
------------------------+---------------------------------------------------
 I've setup a varnish server (3.0) with an apache-tomcat server on the
 backend...

 My default.vcl is
 backend ige_static1 {
   .host = "XXXXXXX";
   .port = "80";
   .connect_timeout = 600s;
   .first_byte_timeout = 600s;
   .between_bytes_timeout = 600s;
 }
 backend ige_dynamic {
   .host = "XXXXXX";
   .port = "80";
   .connect_timeout = 600s;
   .first_byte_timeout = 600s;
   .between_bytes_timeout = 600s;
 }
 sub vcl_recv
 {
         if (req.request == "PURGE")
         {
                 if (!client.ip ~ purge)
                 {
                         error 405 "Not allowed.";
                 }
                 ban(req.url == req.url);
                 error 200 "Purging Done";
         }
   if (req.request == "POST") {
          return(pipe);
      }
   if (req.url ~ "^/portal|^/saml")
   {
     set req.backend = ige_dynamic;
     return(pass);
   }
   set req.backend = ige_static1;
   return(lookup);
 }
 sub vcl_fetch
 {
  if (req.url ~ "\.(png|gif|jpg|swf|css|js|html|txt|pdf)$")
  {
    unset beresp.http.set-cookie;
  }
 }
 sub vcl_deliver
 {
         if (obj.hits > 0)
         {
                 set resp.http.X-Cache = "HIT";
         }
         else
         {
                 set resp.http.X-Cache = "MISS";
         }
 }
 sub vcl_hit {
         if (req.request == "PURGE") {
                 ban (req.url == req.url);
                 error 200 "Purged.";
         }
 }
 sub vcl_miss {
         if (req.request == "PURGE")
        {
                 ban (req.url == req.url);
                 error 200 "Not in cache";
         }
 }
 sub vcl_pipe
 {
         set bereq.http.connection = "close";
 }

 But for some reason, I seem to be loosing Java session dat along the way.
 I set some data on the JAVA side, and after 2-3 pages interaction, the
 data disappears... I checked the same againist my backend apache-tomcat
 server and it works fine over there...

 Any suggestions you can provide would be great... Unless we can fix this
 issue, we'll probably have to migrate out to some other caching
 solution...

 Regards
 Praven John

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




More information about the varnish-bugs mailing list