Report this

What is the reason for this report?

504 Gateway Timeout NGinx

Posted on March 23, 2022

I am running into a 504 gateway timeout error with my express API. I have a droplet using docker-compose to spin up all the resources. When doing research into the issue people say usually you run out of ram but my memory is only at 60%. I think this is more of a load balancer issue but am unaware of the steps to proceed. I added the client_header_timeout config to nginx.config but that didn’t solve the issue. Any insights would be appreciated.



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.

Hello,

I could suggest checking your logs to see if there is some more information on why the connection could be timing out:

docker-compose logs

Feel free to share the logs here after removing any sensitive information.

Also, another thing, if you wish you could share your docker-compose.yaml file here along with your Nginx config and I could have a further look into this.

Regards,

Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.