Welcome! Log In Create A New Profile

Advanced

fastcgi retry upstream (transparent php-fpm restart)?

Etienne Champetier
July 08, 2015 05:16AM
Hi,

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.

I would like to be able to transparently restart php-fpm and not send some
502 to the clients

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") ?

I'm open to any tricks

Thanks in advance
Etienne

p.s: I already know about atomic/transparent php deployment with
"$realpath_root" and multiple docroot (
https://github.com/zendtech/ZendOptimizerPlus/issues/126#issuecomment-24020445
)
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

fastcgi retry upstream (transparent php-fpm restart)?

Etienne Champetier July 08, 2015 05:16AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 248
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready