"no live upstreams while connecting to upstream" Error , Nginx load balancer error

There is a persistent error ever since I upgraded to php8.1 and added a new connection to the upstream of the load balancer. I have looked into all the possible errors and cannot see anything wrong with the configurations. This is a Very recent problem and is a big issue as it causes downtime on the site due to 502 bad gateway error…

The error logs on the load balancer show this.

 [error] 749104#749104: *1042482 no live upstreams while connecting to upstream, client: IP, server:, request: "GET / HTTP/1.1", upstream: "http://proxy_pass/", host: ""

This error started showing up more times and I changed the max fails to be 3. This does not fix all the 502 errors I get in the access logs. it just masks the issue. The fact that I added a new server into the upstream could be the issue but the requests still go through to php and the site stays up until the 502 errors come in. And then I get a “no live connection error”

I would really appreciate any help here! thanks

Submit an answer
Answer a question...

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
July 19, 2022

Hi there,

As this is a persistent error and it has started occurring after a PHP FPM upgrade, can you confirm if you’ve changed your Nginx proxy pass rule to match the new PHP FPM version? Example:

        fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;

If this is the case, would it be possible for you to share your Nginx server block here so I could see if there is anything wrong with it?

As a side note, I could also suggest taking a look at the following tutorial on how to troubleshoot common Nginx errors: