upstream timed out (110: Connection timed out) while reading response header from upstream

Hi all, After successful deploying MERN stack app into the DO, I got 504 Gateway Time-out issue and I checked server error logs here(/var/log/nginx/error.log)

2021/09/28 16:33:18 [error] 1252#1252: *6 upstream timed out (110: Connection timed out) while reading response header from upstream, client: x.x.x.x, server: _, request: "POST /api/users/login HTTP/1.1", upstream: "", host: "x.x.x.x", referrer: "http://x.x.x.x/signin"

Any suggestions on how to solve this issue? Thanks

Show comments

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.

Site Moderator
Site Moderator badge
September 29, 2021
Accepted Answer

Hi @axiom88guru,

So far in my experience, such errors have always been from the Application side rather than NGINX. Check your Application, I can guarantee there will be a misconfiguration somewhere on it rather than with NGINX.

Other than that, I can’t give more suggestions just because I’m not sure what your setup is or the configuration of the app.

Try DigitalOcean for free

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

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel