File uploads are super slow BECAUSE THEY'RE SENT IN MANY SMALL POST REQUESTS, WTF?!

Did anyone else hit their reverse proxy (nginx / apache / others…) configured request size limit?

These limits may not be easy to raise, for security reasons, especially if the reverse proxy is shared by other servers that don’t need huge file upload capabilities.

1 Like

Normally you would apply the upload size limit to one parrticular vhost.

But I see how splitting the files can help when there is an unchangeable upload limit or the files are larger than the largest upload limit (i.e. 1GB file with 100MB limit on cloudflare free plan)

In this case, it would help a lot if the UploadFS module could upload multiple chunks in parallel.

But if the server upload limit allows, one request will always be fastest I think.

The problem is, the UploadFS thing calculates the progress based on completion of chunks, so if you just set the chunk size really high so it uploads in one chunk, the progress meter will show 0% the entire time, then jump to 100% the moment it’s done.

So I think the UploadFS module needs major changes, but it appears it is now discontinued :man_shrugging:

Well in this case, what is the best way to fix this issue?

Especially on local networks, file upload and download speeds needs to be drastically improved. It’s currently extremely slow. Fixing that first, we can worry about reverse proxies next.

on open.rocket.chat or if you are running develop there is this PR being ran: https://github.com/RocketChat/Rocket.Chat/pull/16617

But… while sending in big chunk… you for sure will hit limits of your proxy for bigger files

What’s the best way to get around this?

Easiest is to increase limit. Best is probably to implement multi-part upload so chunks aren’t being sent too big

For reverse proxies like Caddy or Nginx, how would you increase the limit?

I’d have to tell you to refer to their individual documentation. Nginx I think its called like client_max_body_size no clue what caddy calls it. But i’m sure they have it in the docs or their forum somewhere

1 Like

Is this issue still ongoing? I’m experiencing this too with a fresh install