Question

How to solve the 504 connection timeout error?

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


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.

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