[Varnish] #1057: Varnish 3.0.2-streaming stops forwarding requests
Varnish
varnish-bugs at varnish-cache.org
Wed Nov 9 23:19:32 CET 2011
#1057: Varnish 3.0.2-streaming stops forwarding requests
-----------------------+----------------------------------------------------
Reporter: hidi | Type: defect
Status: new | Priority: normal
Milestone: | Component: varnishd
Version: 3.0.2 | Severity: major
Keywords: streaming |
-----------------------+----------------------------------------------------
I've tested 3.0.2 streaming release today. I've upgraded from 3.0.2
normal. The streaming release stops forwarding answers from the backend.
I've tested the following simple VCL:
backend default {
.host = "127.0.0.1";
.port = "80";
}
sub vcl_fetch {
set beresp.do_stream = true;
}
Normal release works ok, but the streaming release simply "forgets" to
answer to the client. The backend has sent the whole file to varnish, but
somewhere it stops processing it. (Connection to the backend is closed)
0 CLI - Wr 200 19 PONG 1320874083 1.0
13 BackendOpen b default 127.0.0.1 45181 127.0.0.1 80
13 TxRequest b GET
13 TxURL b /something
13 TxProtocol b HTTP/1.1
13 TxHeader b Host: example.com:81
13 TxHeader b User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:7.0.1)
Gecko/20
100101 Firefox/7.0.1
13 TxHeader b Accept:
text/html,application/xhtml+xml,application/xml;q=0
.9,*/*;q=0.8
13 TxHeader b Accept-Language: hu-hu,hu;q=0.8,en-us;q=0.5,en;q=0.3
13 TxHeader b Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7
13 TxHeader b X-Forwarded-For: 192.168.44.5
13 TxHeader b X-Varnish: 520133398
13 TxHeader b Accept-Encoding: gzip
13 RxProtocol b HTTP/1.1
13 RxStatus b 404
13 RxResponse b Not Found
13 RxHeader b Date: Wed, 09 Nov 2011 21:28:04 GMT
13 RxHeader b Server: Apache
13 RxHeader b X-Cache-Control-Origin: php-script
13 RxHeader b Transfer-Encoding: chunked
13 RxHeader b Content-Type: text/html
13 Fetch_Body b 3(chunked) cls 0 mklen 1
13 Length b 30
13 BackendReuse b default
0 CLI - Rd ping
0 CLI - Wr 200 19 PONG 1320874086 1.0
0 CLI - Rd ping
0 CLI - Wr 200 19 PONG 1320874089 1.0
0 CLI - Rd ping
Yes this is a 404 but it's an output of a script.
ErrorDocument 404 /404.php
404.php:
<?php
echo "hello world!";
?>
Streaming seems to be broken at the moment.
Is it possible to lock an objest just after if varnish has received
the headers of the response? I think it makes no sense to read a whole
"big file" if we are sure we will not be or not want to cache it!
I think the simple and best solution would be that if locking would occur
just after if we have received the headers! If we will not be able the
cache the answer just switch to pipe mode! Is it possible to switch to
pipe mode from vcl_fetch??
(Plus: we should switch to pipe mode if the received answer reaches a
length in bytes!)
--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1057>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list