Cookies being sent back with a cached response

Rob S rtshilston at
Tue Oct 6 12:02:20 CEST 2009

Cosimo Streppone wrote:
> Rob wrote:
>> I'd suggest you add the varnish ID in the Apache log files (or 
>> similar), then wait for a user to report the problem.
> That's interesting.
> I didn't think of cross-referencing apache logs.
You can log the varnish request in the Apache logs with something like:

LogFormat "%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\"
%D %{Host}i %A \"%{X-Varnish}i\""  combined

>> work out what their user id should be, find their access in the 
>> varnish logs, and play back the log file to see the back end request.
> Are you referring to the varnishlog output, or the varnishncsa output?
> What's the common practice? Archiving varnishlog or varnishncsa (or
> something else) output?
I was referring to the varnishlog output.  You can replay a request with
something like:

varnishlog -r /var/log/varnish/varnish.log -c -o TxHeader 264247211

As for storage, all I can tell you is what we do - store both, rotate
daily or weekly, and keep historically as appropriate.
>> You'll end up kicking yourself once you find the problem....  we 
>> certainly have on occasion.
> I hope so :)
> Thanks for your ideas.

More information about the varnish-misc mailing list