<div>I have a nginx setup with a fastcgi upstream of 5 servers</div><div>10.1.1.1 to 10.1.1.5</div><div> </div><div>When a PHP has a long loop (which is due to bad php coding which is difficult to fix at this moment where the PHP process itself crashes),</div>
<div> </div><div>The nginx fastcgi request loops through all the servers, for example the error logs show:</div><div>2012/10/14 18:33:52 [error] 4478#0: *900244 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 122.32.55.139, server: <a href="http://mydomain.com">mydomain.com</a>, request: "GET /132727767 HTTP/1.1", upstream: "fastcgi://<a href="http://10.1.1.1:9000">10.1.1.1:9000</a>", host: "<a href="http://www.mydomain.com">www.mydomain.com</a>"<br>
2012/10/14 18:34:06 [error] 4478#0: *900244 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 122.32.55.139, server: <a href="http://mydomain.com">mydomain.com</a>, request: "GET /132727767 HTTP/1.1", upstream: "fastcgi://<a href="http://10.1.1.2:9000">10.1.1.2:9000</a>", host: "<a href="http://www.mydomain.com">www.mydomain.com</a>"<br>
2012/10/14 18:34:23 [error] 4478#0: *900244 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 122.32.55.139, server: <a href="http://mydomain.com">mydomain.com</a>, request: "GET /132727767 HTTP/1.1", upstream: "fastcgi://<a href="http://10.1.1.3:9000">10.1.1.3:9000</a>", host: "<a href="http://www.mydomain.com">www.mydomain.com</a>"<br>
2012/10/14 18:34:36 [error] 4478#0: *900244 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 122.32.55.139, server: <a href="http://mydomain.com">mydomain.com</a>, request: "GET /132727767 HTTP/1.1", upstream: "fastcgi://<a href="http://10.1.1.4:9000">10.1.1.4:9000</a>", host: "<a href="http://www.mydomain.com">www.mydomain.com</a>"<br>
2012/10/14 18:34:52 [error] 4478#0: *900244 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 122.32.55.139, server: <a href="http://mydomain.com">mydomain.com</a>, request: "GET /132727767 HTTP/1.1", upstream: "fastcgi://<a href="http://10.1.1.5:9000">10.1.1.5:9000</a>", host: "<a href="http://www.mydomain.com">www.mydomain.com</a>"<br>
</div><div>Therefore I have tried</div><div>fastcgi_next_upstream error;</div><div>and</div><div>fastcgi_next_upstream off;</div><div> </div><div>But this does not seem to help... Am I missing something?</div>