Nginx returns 502 while the backend is restarting. How can I make nginx proxy retry N times with M seconds delay? Is there a plugin or something else?
I found that Nginx took ~2 seconds to exhaust attempts if you specified hundreds of instances of the same backend:
(.... er, repeat as required!)
Yes, a horrendous kludge - but it does add a degree of tenacity...
Even worse than that, you could use:
Assuming Nginx is running on port 80, this would try to continually loop the request around Nginx until localhost:8080 responds. I.e. retry an infinite(?) number of times with zero seconds delay.
I'll get back to my padded cell now....