Report this

What is the reason for this report?

How to solve the 504 connection timeout error?

Posted on January 4, 2022

Using droplet - nodejs backend - trying to upload images/videos >200 MB – tested uploading one video of 195 MB, tested uploading 30 images overall 200 MB



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, @parth24

Would you mind sharing more details about the 504 timeouts? Have you checked the weblogs to track down the exact error message and also do you run the Node.js server with Nginx for example?

If you’re using Nginx make sure to check the value of client_max_body_size and also check for the memory usage on the droplet during the file uploads.

A similar issue was described in this question in our community:

https://www.digitalocean.com/community/questions/504-gateway-time-out-nginx-nodejs

Hope that this helps! Regards, Alex

The developer cloud

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

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Dark mode is coming soon.