Always a SessionClose after a Cache Hit

Lasse Karstensen lkarsten at
Fri Apr 26 10:08:19 CEST 2013

On Thu, Apr 18, 2013 at 04:21:08PM -0400, Bruce Rudolph wrote:
> Running Varnish 3.0.3 on CentOS 5.8.
> I am wondering why there is a SessionClose after a cache hit and delivery. The example below shows the varnishlog output of the request/response. There is a keep-alive header in the request and response. Normally the client calling my app would still keep the session open and is supposed to send more requests.
> 10773 TxHeader     c Connection: keep-alive
> 10773 Length       c 13
> 10773 ReqEnd       c 134881832 1366314917.734391928 1366314917.734510899 1.976155043 0.000053167 0.000065804
> 10773 SessionClose c EOF

Hi Bruce.

I had a look at the source. This message (on Linux) originates from cnt_wait()
in cache_center.c. (line 122)

It means pretty much what it says. After session_linger has passed Varnish
attempts to read a new request, and the read from the socket fails because the
other end has disconnected.

I'd break out tcpdump/wireshark and check if your client is behaving in a
different way than you are expecting.

With regards,
Lasse Karstensen
Varnish Software AS

More information about the varnish-misc mailing list