GuzzleHttp cause 504 and upstream timeout from one droplet behind the load balancer

I got suddenly my server can not be access…right now just for test i have one droplet behind the load balancer and firewall with standard setup (Digital Ocean FW to that droplet), when i see on nginx/log/access i got the access that same with the error time is like this :

[09/Mar/2022:08:20:53 +0000] “GET /ap?co=42656._px&cid=342888 HTTP/1.1” 504 176 “-” “GuzzleHttp/7”

and the error log is

2022/03/09 08:20:53 [error] 2323#2323: *1232 upstream timed out (110: Connection timed out) while reading response header from upstream, client:, server:, request: “GET /ap?co=42656._px&cid=342888 HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php/php7.4-fpm.sock”,

so i think it’s something wrong on load balancer or from firewall? is using guzzlehttp / curl to outside domain to get data considering as “outbound” ?

so i am duplicate this server and put it as stand alone droplet and pointing the domain to there…when it access like that everything run ok? no error at all and run smooth even i leave for one day…this is duplicate server from snapshot so nginx config,etc should be same…the different just not behind the loadbalancer? any idea why? thank you!

Submit an answer

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 5, 2022

Hi there,

It looks like that this might be a problem with your PHP FPM service.

Make sure that the service is up and running:

systemctl status php7.4-fpm.service

If the service is not running, make sure to restart it:

systemctl restart php7.4-fpm.service 



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up