RocketChat / RocketChat/Rocket.Chat
Uploading a 50 MB video causes extreme server CPU, memory and disk usage
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 relatively small video file, around 50 MB, caused the Rocket.Chat server to reach extreme resource usage. During/after the upload, disk I/O, disk throughput, CPU and memory usage went to the limit according to server monitoring.
The file was a normal video uploaded through the chat UI. I would not expect a 50 MB upload to put the whole server under this level of load.
Steps to reproduce:
- Open a room/channel in Rocket.Chat.
- Upload a video file of about 50 MB.
- Send the message with the video attachment.
- Watch server resource usage during and shortly after the upload.
Expected behavior:
Rocket.Chat should handle this upload without exhausting server resources. CPU, memory and disk usage may increase temporarily, but should remain within a reasonable range and return to normal after the upload/processing is finished.
Actual behavior:
After uploading the video, the server reached extreme values for disk, memory and CPU usage.
From monitoring:
- Disk I/O and disk throughput spiked heavily.
- CPU reached near 100%.
- Memory also reached the limit.
- The server stayed under heavy load after the upload.
I will attach screenshots from monitoring that show the disk I/O, disk throughput, CPU and memory behavior.
Server Setup Information:
- Version of Rocket.Chat Server: 8.4.1
- License Type: Starter
- Number of Users: 20
- Operating System: Docker
- Deployment Method: Docker
- Number of Running Instances: 1?
- DB Replicaset Oplog: unknown
- NodeJS Version: v22.22.2
- MongoDB Version: 8.2.7 / wiredTiger
- File upload storage type: unknown
- Reverse proxy: other
Client Setup Information
- Desktop App or Browser Version: Android
- Operating System: 16
Additional context
The video was about 50 MB. It was a normal user upload, not an import or automated upload.
This looks like the server may be doing very expensive processing or repeated disk reads/writes for video attachments. I do not know yet if this is related to file storage, preview/thumbnail generation, transcoding, antivirus scanning, or another upload-processing step.
Relevant logs:
I do not have relevant Rocket.Chat logs yet. I can provide logs around the upload timestamp if needed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files, tests, or entry points are identified. First reproduce the 50 MB video upload in the Docker deployment while collecting Rocket.Chat logs and monitoring storage, preview, and upload-processing activity; then trace the relevant server path from the observed logs. Done means the upload completes without exhausting CPU, memory, or disk resources and the load returns to normal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, mongodb, node.js, typescript
- Domain
- backend, devops, observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100