Backend polling not working
Izak Burger
izak at upfrontsystems.co.za
Thu Oct 15 12:29:16 CEST 2009
Apologies for the (mostly) monologue this far :-)
Izak Burger wrote:
> Alright, I have to take that back. I changed the port so varnish talks
> to apache instead and that works. That means zope somehow manages to
> cause a POLLIN event on the file descriptor even though there is nothing
> to read. Will have to do more research on this.
It appears the fault is somewhere in zope.
I ended up writing a test program to illustrate the problem. The reason
why poll() returns and yet read() has nothing to read is that poll()
always implicitly checks for the additional events POLLERR, POLLHUP and
POLLLNVAL, so simply checking that poll() returns greater than zero is
not a guarantee that there is data to be read.
In my case, poll() returns immediately because POLLHUP has occured. It
seems that zope reacts (incorrectly it would seem) on the shutdown()
call and closes down the entire connection.
I will have to take this up with zope-dev.
regards,
Izak
More information about the varnish-dev
mailing list