<div dir="ltr"><div><div><div><div><div>Hi,<br></div><div><br>I'm using nginx with 1 php-fpm (via unix socket), and i'm wondering if there is a way to make nginx retry on error, something like fastcgi_next_upstream but for the same upstream.<br></div><br>I would like to be able to transparently restart php-fpm and not send some 502 to the clients<br><br></div>So, is there a way to make nginx retry the same upstream for X seconds (or retry every Y seconds for max Z attempts or ...) (on errors like "connect() failed (111: Connection refused) while connecting to upstream") ?<br><br></div><div>I'm open to any tricks<br></div><div><br></div>Thanks in advance<br></div>Etienne<br><br></div>p.s: I already know about atomic/transparent php deployment with "$realpath_root" and multiple docroot (<a href="https://github.com/zendtech/ZendOptimizerPlus/issues/126#issuecomment-24020445">https://github.com/zendtech/ZendOptimizerPlus/issues/126#issuecomment-24020445</a>)<br></div>