Pipe issue
Dridi Boukelmoune
dridi at varni.sh
Tue May 19 17:16:17 CEST 2015
Hi Jérémy,
It actually makes sense both according to the documentation (the state
machines), and the goal of vcl_pipe.
If your request was asking for a protocol upgrade, you can no longer
respond with http. If you are piping http traffic, you should instead
rely on return(pass).
Best Regards,
Dridi
On Tue, May 19, 2015 at 4:04 PM, Dridi Boukelmoune <dridi at varni.sh> wrote:
> Hi,
>
> Please find attached a test case that reproduces the behaviour.
>
> Here's what happens for c2:
>
> $ varnishtest -v 1pipe.vtc | awk '{ if ($2 == "c2") print}'
> ** c2 0.4 Starting client
> ** c2 0.4 Waiting for client
> ** c2 0.4 Started (5 iterations)
> *** c2 0.4 Connect to 127.0.0.1 34647
> *** c2 0.4 connected fd 10 from 127.0.0.1 45762 to 127.0.0.1 34647
> *** c2 0.4 txreq
> **** c2 0.4 txreq| GET / HTTP/1.1\r\n
> **** c2 0.4 txreq| \r\n
> *** c2 0.4 rxresp
> ---- c2 0.4 HTTP rx EOF (fd:10 read: Success)
>
> Should I file an issue in trac? It doesn't feel right.
>
> Best Regards,
> Dridi
>
> On Tue, May 19, 2015 at 2:36 PM, jérémy HAGE <hage.jeremy at gmail.com> wrote:
>> Hello,
>>
>> I am encountering an issue with varnish and pipes. When the number of
>> backend connections achieves max_connections, varnish doesn't send any data.
>>
>> The error message from curl is "curl: (52) Empty reply from server". That
>> seems to be a bug because, in my opinion Varnish is supposed to reply a 503
>> error at least.
>>
>> It is easy to reproduce. I installed the official debian package (wheezy) of
>> varnish 4. Then I put this little configuration.
>>
>> vcl 4.0;
>> backend default {
>> .host = "127.0.0.1";
>> .port = "80";
>> .max_connections = 1;
>> }
>>
>> sub vcl_recv {
>> return (pipe);
>> }
>>
>> Then I made 2 simultaneous connections. To make it as simplest as possible,
>> I installed Apache as backend with mod_php and I added a script which only
>> makes a "sleep(10)". When I make 2 curl simultaneously, the second gives me
>> this error "curl: (52) Empty reply from server" .
>>
>> Is it an expected behavior?
>>
>> Best regards,
>> --
>> Jérémy HAGE
>>
>>
>> _______________________________________________
>> varnish-misc mailing list
>> varnish-misc at varnish-cache.org
>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
More information about the varnish-misc
mailing list