Backend polling not working
izak at upfrontsystems.co.za
Wed Oct 14 19:42:05 CEST 2009
I tried varnish today for the first time. This happened after we
upgraded to a newer version of squid and it hung itself in an infinite
loop. But that is a different story.
We want to use varnish to front a number of zope backends, all of which
speak to the same database backend (so they serve the same content). The
problem with this zope application is that it takes a long time to
reload. Those who know plone knows it is very heavy on the catalog, and
in our case it means that after restarting a backend, it can take up to
15 minutes for the caches to warm up again. During this time, we would
like the zope backends to be marked as sick and not be used.
Unfortunately this does not seem to work in version 2.0.4 (which seems
the most recent if I check your svn tags). The odd thing is this: it
seems that the probe succeeds, but zope's access log shows that zero
bytes is transferred, eg:
10.0.0.12 - Anonymous [14/Oct/2009:18:38:38 +0200] "GET /plonesite
HTTP/1.1" 200 0 ""
Note the zero after the 200 status. I suspect this causes a problem on
line 220 of bin/varnishd/cache_backend_poll.c, where rlen is the length
of data read from zope:
if (rlen == 0)
The result of this is a sick backend, eg:
0 Backend_health - live1 Still sick 4--X-S--- 0 2 3 0.000000 0.000000
Using wireshark to log at the network traffic confirms that the HTTP
request is sent, but no response, corresponding with the access log.
This seems very similar to this report:
Has anyone seen this problem before? Perhaps there is a fix in svn
already? I could not see anything that looked promising while looking
through the subversion logs.
More information about the varnish-dev