1

While trying to upload large files, I am getting 504 timeout error. Using node.js/multer , cloudflare , nginx , ec2. the network is not that great and it takes time to upload the file, getting timeout after 4-7 minutes into the upload. was not spotting an exact same timeout periods, it is always random

dev.rahul
  • 141
  • 1
  • 7

2 Answers2

1

It might be due to Cloudflare free package that limits you from uploading files greater than 50mb.

Sangeeth John
  • 330
  • 1
  • 10
0

In your Nginx configurations for the server, probably you need to change the limit at

client_max_body_size 5M;

to something like 10M or whatever your max file size is

client_max_body_size 10M;

plus if using nginx proxy increase timeout limits too

proxy_connect_timeout       600;
proxy_send_timeout          600;
proxy_read_timeout          600;
send_timeout                600;
mobby
  • 361
  • 4
  • 8