TCP RST in varnish reply

Carsten Ranfeld carsten.ranfeld at
Tue Sep 8 16:02:33 CEST 2009


we use varnish at a customer's site for about 2 weeks and it sped up
delivery performance a lot. Although we experience some problems,
including the following:

A HTTP POST request is made. For the respective URL part in vcl_recv()
as well as in vcl_fetch() we configured a pass explicitly to circumvent
any caching. So what happens? 

1. the client sends its request to varnish
2. varnish passes the request to one of two backends
3. the backend replies
4. varnish replies to the client - and here the problem occurs - in the
middle of the HTTP response the TCP connection is reset by varnish (or
the machine). So content is not delivered fully. varnish log doesn't
show any errors. Tests using different clients show a comparable
behavior - TCP RST and partial delivered content, just the size of the
content delivered differs.

Did anyone experience a similar problem? I searched through
documentation, mailing lists and Google. Unfortunately not a helpful
page was found.

Here the important configuration parts:

sub vcl_recv {

    # just to make sure, we always pass any POST requests
    if (req.request != "GET" && req.request != "HEAD") {
        /* We only deal with GET and HEAD by default */

    if (req.url !~ "^/(foo|bar|_em_cms)") {
sub vcl_fetch {
    if (req.url ~ "^/_em_cms/") {

Regards and thanks in advance

More information about the varnish-misc mailing list