Hi.<div><br></div><div>You can also add the following to your VCL to work around the bug in 2.1.4:</div><div><br></div><div><div>sub vcl_pass {</div><div> unset bereq.http.if-modified-since;</div><div> unset bereq.http.if-none-match;</div>
<div> return (pass);</div><div>}</div></div><div><br></div><div>The problem is that Varnish expects a body when backend issues a 304 and keeps waiting until timeout.<br><br><div class="gmail_quote">On Sun, Nov 28, 2010 at 12:55 PM, Baldur Norddahl <span dir="ltr"><<a href="mailto:baldur.norddahl@gmail.com">baldur.norddahl@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div>Hi,</div><div><br></div>Downgrading from Varnish 2.1.4 to 2.1.3 fixes the problem. Thanks for the help.<div><br>
</div>
<div>I am not using Apache. It is just varnish in front of the play framework, which has a build in webserver.</div>
<div><br></div><div>Regards,</div><div><br></div><div>Baldur<br><br><div class="gmail_quote">On Sun, Nov 28, 2010 at 11:56 AM, FabD [ML] <span dir="ltr"><<a href="http://flylm.ml" target="_blank">flylm.ml</a>@<a href="http://gmail.com" target="_blank">gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2010/11/28 Baldur Norddahl <<a href="mailto:baldur.norddahl@gmail.com" target="_blank">baldur.norddahl@gmail.com</a>>:<br>
> Hello<br>
<br>
Hi,<br>
<br>
Do you use Varnish 2.1.4 with Apache2 ? I got the same issue with the<br>
Debian package of the Varnish repository.<br>
<br>
3 possibilities :<br>
<br>
- Compile by hand the 2.1 branch of the SVN<br>
- Use Varnish 2.1.3 and wait the next Varnish version.<br>
- Test with Apache2 KeepAlive Off and wait the next Varnish version.<br>
<br>
Fabien<div><div></div><div class="h5"><br>
<div><div></div><div><br>
> I am using Varnish-cache in front of a website based on the Play Framework<br>
> (<a href="http://www.playframework.org/" target="_blank">http://www.playframework.org/</a> - a java web framework). I started out with a<br>
> really simple varnish config file:<br>
> backend default {<br>
> .host = "127.0.0.1";<br>
> .port = "9010";<br>
> }<br>
> backend joytools {<br>
> .host = "127.0.0.1";<br>
> .port = "9020";<br>
> }<br>
> sub vcl_recv {<br>
> if (req.http.host ~ "^(www.)?(<a href="http://joytools.dk" target="_blank">joytools.dk</a>|<a href="http://xn--bkkenbund-g3a.dk" target="_blank">xn--bkkenbund-g3a.dk</a>)$") {<br>
> set req.backend = joytools;<br>
> } else {<br>
> set req.backend = default;<br>
> }<br>
> }<br>
> The purpose is to sort out requests to a HTTP virtual host to one backend<br>
> server and all other requests to another. This works.<br>
> However, on the first request or when doing a "refresh" in a browser the<br>
> site becomes extremely slow and unresponsive. I did some work with tcpdump<br>
> to find out what is going on. I captured this:<br>
> --REQUEST--<br>
> GET /public/javascripts/jquery-1.4.2.min.js HTTP/1.1<br>
> Host: <a href="http://xn--bkkenbund-g3a.dk" target="_blank">xn--bkkenbund-g3a.dk</a><br>
> Referer: <a href="http://xn--bkkenbund-g3a.dk/" target="_blank">http://xn--bkkenbund-g3a.dk/</a><br>
> If-Modified-Since: Thu, 11 Mar 2010 09:57:53 GMT<br>
> Accept: */*<br>
> If-None-Match: "1268301473000--44924593"<br>
> User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.7<br>
> (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7<br>
> Accept-Encoding: gzip,deflate,sdch<br>
> Accept-Language: da,en-US;q=0.8,en;q=0.6<br>
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3<br>
> Cookie: PLAY_FLASH=; PLAY_ERRORS=;<br>
> PLAY_SESSION=9df837ef975871bcd0e1fc61189dd457420accaf-%00___ID%3A327ad683-323e-4d25-a824-347ad85bc5df%00<br>
> X-Forwarded-For: 79.98.193.196<br>
> X-Varnish: 287151663<br>
> --REQUEST END--<br>
> --RESPONSE--<br>
> HTTP/1.1 304 Not Modified<br>
> Server: Play! Framework;1.1;dev<br>
> Cache-Control: no-cache<br>
> ETag: "1268301473000--44924593"<br>
> --RESPONSE END--<br>
> After this exchange between Play Framework and Varnish the connection is<br>
> idle for exactly 60 seconds before closing. It looks to me as if Play thinks<br>
> it is done replying but Varnish is expecting something more.<br>
> I hope an expert here can give me a quick pointer to how I proceed resolving<br>
> this issue.<br>
> Thanks,<br>
> Baldur<br>
</div></div></div></div>> _______________________________________________<br>
> varnish-misc mailing list<br>
> <a href="mailto:varnish-misc@varnish-cache.org" target="_blank">varnish-misc@varnish-cache.org</a><br>
> <a href="http://lists.varnish-cache.org/mailman/listinfo/varnish-misc" target="_blank">http://lists.varnish-cache.org/mailman/listinfo/varnish-misc</a><br>
><br>
</blockquote></div><br></div>
<br>_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a href="http://lists.varnish-cache.org/mailman/listinfo/varnish-misc" target="_blank">http://lists.varnish-cache.org/mailman/listinfo/varnish-misc</a><br></blockquote></div><br><br clear="all"><br>-- <br>Per Buer, Varnish Software<br>
Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / skype: per.buer<br>
</div>