RocketChat / RocketChat/Rocket.Chat
Image Upload with Resizing causes Filesystem overflow
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
When we upload an image that needs to be resized the upload hangs at 0% in the UI and our filesystem fills itself to 100% because of a broken file descriptor it seems. The issue was persistent when GraphicsMagick was used and we hoped it would be fixed when switching to the sharp module but it is still happening. We are using StorageType FileSystem for the uploads and Avatar resizing is activated.
Server Setup Information:
- Version of Rocket.Chat Server: 0.62.2
- Operating System: RHEL 7.4 3.10.0-693.21.1.el7.x86_64
- Deployment Method(snap/docker/tar/etc): tar
- Number of Running Instances: 1
- DB Replicaset Oplog: Disabled
- Node Version: 8.9.3
- mongoDB Version: 2.6.12-1
- StorageType: FileSystem
Steps to Reproduce:
- Start image upload that needs to be resized by the server, extension/file type doesn't matter - same problem with avatar upload
Scenario that breaks the upload and fills the filesystem:
Fileupload Storage Type: Filesystem
Filesystem Path: /tmp/ufs (this is linked in the filesystem to /var/rc_fileupload)
Avatar Resize: False
Set Default Avatar: False
Expected behavior:
Image is uploaded, resized and shown in UI
Actual behavior:
Filesystem overflow
Relevant logs:
Browser Logs:
Browser just gets a timeout here.
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 file, test, or entry point is named. Start by reproducing a resized image upload with filesystem storage and inspect the server logs and server-side upload and resize flow; done means the upload completes, the resized image appears in the UI, and repeated failures no longer fill the filesystem.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100