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