Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

File upload problem

Open BugOverlord opened this issue 3 years ago • 2 comments

Description:

I have a problem setting the file size limit on upload. I set a limit of 150 M (in bytes in the web administration GUI). And I am using nginx reverse proxy and in nginx.conf file I am setting the same client_max_body_size. But when I try to upload a file larger than 150MB, I see in whireshark an HTTP-package with 413 Response code ("entity is too large") from nginx but at the same time I see a tcp-session in which the uploaded file is uploaded to the server. This is confirmed by the checked RX bytes in the "netstat -ie" command after file uploading. At the same time, the file download progress bar reaches the final and no error messages or notifications appear in the user GUI. Also, the specified file does not appear either in the used chat window or in the file storage (I use the FileSystem storage type on my server). When I disable nginx, I get a situation in which, with a large file size ~ 1G, the chat server hangs and all clients lose connection and response from the server. Obviously, in a chat situation, there is no need to send large files, but the very situation in which a user can break it by mistake is bad.

Steps to reproduce:

  1. Setup file size upload constraint.
  2. Upload file ~1G or more size to server (I guess it depends on computing power)

Expected behavior:

It is expected to receive a response from the server that the file is too large before it starts downloading and cancel the download of the file.

Actual behavior:

The file is uploaded to the server, but is not displayed either in the correspondence or in the file storage. If the file size is large enough, the server crashes. изображение изображение Pcap file was dumped on server machine while file uploading (provided start of uploading and end of tcp-session, note the package numbers)

Server Setup Information:

  • Version of Rocket.Chat Server: 5.3.0
  • Operating System: ubuntu 20.04.5 LTS
  • Deployment Method: tar
  • Number of Running Instances: 1
  • NodeJS Version: 14.21.1 -x64
  • MongoDB Version: 4.4.17

Client Setup Information

  • Desktop App or Browser Version: Mozilla Firefox 106.0.5 (64-bit)/Rocket.Chat 3.8.13
  • Operating System: Windows 10 Pro and ubuntu 20.04.5 LTS

Relevant logs:

There is no logs about server failure.

BugOverlord avatar Nov 13 '22 17:11 BugOverlord

File is disabled Uploading Screenshot_2022-11-14-14-31-34-753_com.android.chrome.jpg…

muthu1202 avatar Nov 14 '22 09:11 muthu1202

I have the Same Problem too, but I fixed it by this way: https://docs.rocket.chat/guides/administration/admin-panel/settings/file-upload

angle5037 avatar Nov 28 '22 02:11 angle5037