Rocket.chat: Users cannot send attachments larger than 1 MB to rocket chat.

Created on 23 Jun 2020  路  6Comments  路  Source: RocketChat/Rocket.Chat

Description:

When dragging a file into the dialog box or through the "+" menu, the status bar freezes up to 0% and the file is not transferred.

image

Steps to reproduce:

  1. Go to any chat.
  2. Attempt to transfer any file larger than 1 MB.
  3. Attachments not sent.

Expected behavior:

Sending all file sizes allowed.

Actual behavior:

Only small files are transferred. With any size settings.

Server Setup Information:

  • Version of Rocket.Chat Server: 3.3.3
  • Operating System: Debian 9
  • Deployment Method: Kubernetes
  • Number of Running Instances: 12 pods + 3 DB instances
  • DB Replicaset Oplog: Enabled
  • NodeJS Version: 12.16.1 - x64
  • MongoDB Version: 4.0.10
  • Storage Type: Google Cloud Storage
  • Here it is ScreenShot setting of the file size ond file types:
    image

Client Setup Information

Attempts were made from the desktop client (2.17.7) and from the diffrent browsers (Chrome/Chromium, Mozilla)
The problem is observed on different operating systems - Windows, Ubuntu, Mint, MAC OS, iOS ...

For example, here trying send files diffrent sizes and different expansions:

sending files

Most helpful comment

They appeared after updating the server side from 2.4.1 to 3.3.0.

we changed how files are transferred in 3.1.0 via https://github.com/RocketChat/Rocket.Chat/pull/16617 .. before file chunks were transferred via websocket so nginx would not care about it, but now file uploads are sent on a single HTTP requests.

please look at client_max_body_size config on nginx

https://www.tecmint.com/limit-file-upload-size-in-nginx/

All 6 comments

I couldn't replicate the issue here.

I couldn't replicate the issue here.

Yes. I assumed it.
It seems a nontrivial bug.

what reverse proxy are you using (nginx, haproxy, etc)? did you check for any errors on its logs? you might be hitting a limit there.

you can also check your browsers network activity for errors, you can probably spot an error there..

what reverse proxy are you using (nginx, haproxy, etc)? did you check for any errors on its logs? you might be hitting a limit there.

you can also check your browsers network activity for errors, you can probably spot an error there..

We have ingress nginx controller.
Yes. Thanks for the help. I'll try to search there.
But the configuration has not been changed since the launch of the instance.
And there were no problems with file transfer.
They appeared after updating the server side from 2.4.1 to 3.3.0.

They appeared after updating the server side from 2.4.1 to 3.3.0.

we changed how files are transferred in 3.1.0 via https://github.com/RocketChat/Rocket.Chat/pull/16617 .. before file chunks were transferred via websocket so nginx would not care about it, but now file uploads are sent on a single HTTP requests.

please look at client_max_body_size config on nginx

https://www.tecmint.com/limit-file-upload-size-in-nginx/

Yeah.
In our case, we needed to add the annotations parameter:
.... / proxy-body-size: 10mb
In the * .yaml file and apply it for getting change on our instance.
As shown in the example:
https://docs.nginx.com/nginx-ingress-controller/configuration/ingress-resources/advanced-configuration-with-annotations/

Thanks for your quick feedback.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danpospisil picture danpospisil  路  3Comments

zeigerpuppy picture zeigerpuppy  路  3Comments

mattlin picture mattlin  路  3Comments

djeber picture djeber  路  3Comments

Kiran-Rao picture Kiran-Rao  路  3Comments