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 site.com-error.logs show this.
[error] 749104#749104: *1042482 no live upstreams while connecting to upstream, client: IP, server: site.com, request: "GET / HTTP/1.1", upstream: "http://proxy_pass/", host: "site.com"
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
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!
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.
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:
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:
https://www.digitalocean.com/community/questions/how-to-troubleshoot-common-nginx-issues-on-linux-server
Best,
Bobby