Help debugging cacheability / ttl information?

Dag-Erling Smørgrav des at linpro.no
Mon Feb 18 11:52:23 CET 2008


Denis Brækhus <denis at startsiden.no> writes:
> Dag-Erling Smørgrav <des at linpro.no> writes:
> > You should get a varnishlog entry for the TTL computation when an
> > object is retrieved from the backend, but there won't be a log entry
> > for VCL changing the TTL...
> Ok, thanks. I guess what I am missing is a VCL debugger of some sort ;)

There is a VCL trace facility, but I'm not sure it will tell you what
obj.ttl is set to.

> But joke aside, the logentries are definitely helpful, there are
> only so many of them it is sometimes a bit overwhelming when you do
> not know exactly what you are looking for.

Yes, most of them are listed in the man page, but they are not
described.

> > Instead of Firebug, have you considered using the following:
> > while :; do
> >     wget -O/dev/null -S http://www.example.com/ 2>&1 | \
> >         grep -i '^age:' ;
> >     sleep 5 ;
> > done
> Yes, I used curl in a similar fashion, and again the age header
> seemed to be a bit low. But it seems the minimum TTL parameter for
> varnishd "fixed" this situation for us.

I can't remember if 1.0.4 can do this, but I think that in 1.1.2 you
can add a header to the object so you can see the ttl:

set obj.http.X-TTL = obj.ttl

> List traffic sort of indicated there were always some snags with the
> 1.1.x builds, but 1.1.2 seems to be working fine for people I
> gather?!

There should be fewer snags with 1.1 than with 1.0, and especially
with 1.1.2 which had months to mature before release.  There are still
known bugs in it with known solutions, but merging those solutions
would require merging large amounts of other code, and we would
probably end up with 1.1.3 being *less* stable than 1.1.2.  I believe
that most of these bugs are documented in the change log.

DES
-- 
Dag-Erling Smørgrav
Senior Software Developer
Linpro AS - www.linpro.no



More information about the varnish-misc mailing list