RocketChat / RocketChat/Rocket.Chat

Large Video (and possibly other types) Uploads Crash RocketChat Server

Open
#19,205 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

Uploading a large file causes RocketChat to crash

Steps to reproduce:
  1. In a private chat channel or a room, upload a large video file (or zip etc)
  2. After the upload reaches 100%, RocketChat will crash

NOTE: When RocketChat is restarted, the upload will start again, be sure to cancel it.

Expected behavior:

RocketChat should probably have default and administrative control over maximum file sizes (probably overall and by mime type).

Actual behavior:

The docker container stopped. No errors were logged pertaining to this issue.

Server Setup Information:
  • Version of Rocket.Chat Server: 3.7.0
  • Operating System: linux 3.10.105 (x64) (Synology)
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Enabled
  • NodeJS Version: 12.18.4
  • MongoDB Version: 4.4.1
Client Setup Information
  • Desktop App or Browser Version: Edge (current version)
  • Operating System: Windows 10
Additional context

I only tried this once as I didn't want to keep knocking our server offline. Basically I was trying to upload a video that was much larger than I thought I was (it was just short under 900MB). I have not isolated what the maximum size is or verified the behavior with large files of other mimetypes.

Relevant logs:

It did not log anything related to this issue.

Before the container restart the previous entry was an exception 3 hours earlier (container restart was at 21:32).

2020-10-07 19:01:12 | stdout | at packages/simple_json-routes.js:98:9
-- | -- | --
2020-10-07 19:01:12 | stdout | at packages/nimble_restivus/lib/route.coffee:59:33
2020-10-07 19:01:12 | stdout | at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32)
2020-10-07 19:01:12 | stdout | at Object._internalRouteActionHandler [as action] (app/api/server/api.js:394:39)
2020-10-07 19:01:12 | stdout | at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
2020-10-07 19:01:12 | stdout | at app/api/server/api.js:394:82
2020-10-07 19:01:12 | stdout | at Object.post (app/api/server/v1/misc.js:262:26)
2020-10-07 19:01:12 | stdout | at Server.call (packages/ddp-server/livedata_server.js:1607:17)
2020-10-07 19:01:12 | stdout | at Server.apply (packages/ddp-server/livedata_server.js:1638:22)
2020-10-07 19:01:12 | stdout | at Promise.await (/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:60:12)
2020-10-07 19:01:12 | stdout | => awaited here:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report names app/api/server/api.js, app/api/server/v1/misc.js, packages/simple_json-routes.js, and packages/nimble_restivus/lib/route.coffee in the available stack trace. Start by reproducing the large upload and tracing the upload-completion path around these entry points. Done means large uploads no longer stop the Docker container and maximum file sizes have clear default and administrative controls.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, linux, mongodb, node.js
Domain
backend, devops
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.