Ticket #650 (closed defect: worksforme)
Varnish probes and nginx + FastCGI don't get on together.
| Reported by: | t0m | Owned by: | phk |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | varnishd | Version: | trunk |
| Severity: | major | Keywords: | |
| Cc: |
Description
It seems to be well known (but somewhat obscure - took some effort to convince out of google) that varnish health checks don't play well with nginx when it is proxying content or serving FastCGI:
E.g.
http://www.docunext.com/wiki/Varnish#Working_VCL_Failover_Example
http://sys-notes.com/bin/view/Main/NginxProblems
This is as varnish closes the request socket before nginx starts sending a response, ergo nginx returns a 499 error code.
I could use the workaround given in the first example, however this makes the varnish health checking useless to me - as the fact that nginx is up means nothing to me without the FCGI application it is serving being available.
If it is felt that this behavior is incorrect on the part of nginx, then this should be documented to stop people falling into this trap. Otherwise, the connection varnish makes should be kept open until data is being recieved from the backend (polled) web server, or the timeout is reached.

