Varnishncsa stucks after error vcl message

Ken Brownfield kb+varnish at slide.com
Sat Jul 25 02:33:18 CEST 2009


The following seems to stop this behavior, but honestly I don't know  
enough (yet) about the bogus marker and /why/ it's causing a future  
request to be dropped.  Varnishlog output seems correct.

I'm not sure the "error 200" method is an especially clean way of  
doing this, but silently dropping logs is pretty evil.  Error 403  
seemed to also cause this in my testing... which I use :(

--- bin/varnishncsa/varnishncsa.c.O	2009-07-24 17:00:56.000000000 -0700
+++ bin/varnishncsa/varnishncsa.c	2009-07-24 17:01:35.000000000 -0700
@@ -330,8 +330,7 @@
  		break;

  	case SLT_SessionClose:
-		if (strncmp(ptr, "pipe", len) == 0 ||
-		    strncmp(ptr, "error", len) == 0)
+		if (strncmp(ptr, "pipe", len) == 0 )
  			lp->bogus = 1;
  		break;

-- 
Ken

On Jul 24, 2009, at 1:19 PM, Tarick wrote:

> Hello, fellows.
> I have a problem with varnishncsa on V2.0.4 on CentOS 5.3 x86_64,  
> depicted in http://varnish.projects.linpro.no/ticket/533
> I didn't include anyone in CC of that ticket, so I guess it will  
> stay unanswered for a while.
> The problem is as follows:
> 1. we have the code in vcl config that is used as a keepalive  
> functionality of Varnish itself.
> vcl_recv {
> ---skipped---
>        if (req.url == "/ServerStatus") {
>
>             error 200 "ONLINE";
>         }
>         lookup;
> }
>
> Therefore if we call http://cache/ServerStatus, we'll get HTTP 200  
> OK and some text.
>
> 2. Starting from Varnish 2.0.3 (the version we've upgraded to from  
> 1.1.2), varnishncsa stopped logging any second request after that  
> ServerStatus request. The third request is logged as it should. As  
> this is the keepalive check, it occurs every 5 seconds, and  
> therefore we are losing big part of our requests from logs.
>
> 3. I've tried using the first version of varnishncsa from Varnish  
> 1.1.2 and it logged properly every request, though without client  
> address. Of course we cannot use it thereof. But this confirms that  
> the problem is in varnishncsa, not our config or environment.
>
> I suspect that the fix is easy, so I'd like to ask anyone who can  
> fix that to look at it.
>
> Thank you,
>
> Tarick.
> _______________________________________________
> varnish-bugs mailing list
> varnish-bugs at projects.linpro.no
> http://projects.linpro.no/mailman/listinfo/varnish-bugs




More information about the varnish-bugs mailing list