Comments (7)
traced it to rocketchat_userDataFiles.chunks
from rocket.chat.
Could be a failed upload? Is there a way to clear out the userDataFiles and userDataFiles.chunks?
from rocket.chat.
Are you using GridFS?
It really isn't up to storing large amounts of file.
You should migrate to local file storage or some form of online storage.
https://github.com/RocketChat/filestore-migrator
from rocket.chat.
I found the issue, one of the users had started a download of content for their user off the server, the download failed, but it was stuck in the cron list and kept initiating every 2 minutes, and I believe the .wt file contained some portion of the failed zip? file, which repeatedly added 250MB every 2 minutes to userDataFiles and userDataFiles.chunks and that .wt. I deleted the cron job and the failed compressed images from the database in userDataFiles and userDataFiles.chunks directly and it resolved the issue.
So possibly this is issue is really related to the failed user content download, but can close otherwise.
from rocket.chat.
Ah excellent and thanks for letting us know!
I'll leave it open for the moment and ask someone to consider this.
from rocket.chat.
We experienced the same issue. This added >150GB of data within 24h until our server ran out of space.
Every ~2 minutes, a new document was added to rocketchat_user_data_files
looking like this
{
_id: 'qcg7KSZGJWqnyPzMn',
userId: 'SZJmM6FCEnm9W3PL3',
type: 'application/zip',
size: 353507086,
name: '2024-05-15-John%20Doe-qcg7KSZGJWqnyPzMn.zip',
store: 'GridFS:UserDataFiles',
_updatedAt: ISODate('2024-05-15T09:36:02.597Z')
}
Also, corresponding documents were added to rocketchat_userDataFiles.chunks
and rocketchat_userDataFiles.files
. All the added data was related to the same user. The user claims he did not upload or download anything. Our server is set up to accept uploads up to ~10MB. Mind, the size in the document is ~350MB?! We were not able to reproduce the issue after fixing it on the MongoDB side.
We were able to fix the issue, performing the following steps:
- Shut down the Rocket Chat container
docker compose stop rocketchat
- Enter the mongo shell
docker compose exec -it mongodb mongosh
- Select the
rocketchat
database:use rocketchat
- Find the cause of the problem by looking at the data in
rocketchat_user_data_files
,rocketchat_userDataFiles.chunks
androcketchat_userDataFiles.files
, e.g.db.rocketchat_user_data_files.find().pretty()
- For us, it was a single user with a fresh account, so we could simply select his
userId
. You may need to adjust for your case. You will also need some free disk space, as the mongoDB will keep growing in size while deleting. You might need to execute the delete in batches and free up space withdb.runCommand({compact: "rocketchat_userDataFiles.chunks", force: true})
in between. - Consider first creating an index on
rocketchat_userDataFiles.chunks
. Otherwise, deleting can take much longer.
db.rocketchat_userDataFiles.chunks.createIndex({"files_id": 1})
- Delete the files from the database:
const userId = 'identified-user-id'
var cursor = db.rocketchat_user_data_files.find({userId: userId})
while (cursor.hasNext()) {
var file = cursor.next();
db.rocketchat_userDataFiles.chunks.deleteMany({"files_id": file._id });
db.rocketchat_userDataFiles.files.deleteOne({"_id": file._id });
}
db.rocketchat_user_data_files.deleteMany({userId: userId});
- Compact the collection to free up disk space:
db.runCommand({compact: "rocketchat_userDataFiles.chunks", force: true})
- Drop the index:
db.rocketchat_userDataFiles.chunks.dropIndex("files_id_1")
- Restart and recreate the Rocket Chat container:
docker compose up -d rocketchat --force-recreate
Server Setup Information:
- Version of Rocket.Chat Server: 6.8.0
- Operating System: Ubuntu 22.04
- Deployment Method: Docker
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version:
- MongoDB Version: 5.0.24
from rocket.chat.
Just realized the data in the collections is from the data self-checkout on /account/preferences
. So we might be fine just removing all data from the three mentioned collections?
However, since removing the excessive data with the process described above, the self-checkout isn't processed anymore. We get the following error message in the logs, which seems to stem from the deleted data, possibly. It keeps repeating over and over every few minutes.
rocketchat-1 | Error: ENOENT: no such file or directory, stat '/tmp/zipFiles/feefe5d3-7aa5-4c0f-b2c0-98517a42106f.zip'
rocketchat-1 | => awaited here:
rocketchat-1 | at Function.Promise.await (/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)
rocketchat-1 | at server/lib/dataExport/uploadZipFile.ts:12:16
rocketchat-1 | at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
rocketchat-1 | => awaited here:
rocketchat-1 | at Function.Promise.await (/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)
rocketchat-1 | at server/lib/dataExport/processDataDownloads.ts:232:25
rocketchat-1 | at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40 {
rocketchat-1 | errno: -2,
rocketchat-1 | code: 'ENOENT',
rocketchat-1 | syscall: 'stat',
rocketchat-1 | path: '/tmp/zipFiles/feefe5d3-7aa5-4c0f-b2c0-98517a42106f.zip'
rocketchat-1 | }
Any way to fix this?
Edit: Simply creating the file inside the container does the trick and allows RC to continue, e.g. touch /tmp/zipFiles/feefe5d3-7aa5-4c0f-b2c0-98517a42106f.zip
from rocket.chat.
Related Issues (20)
- Message toolbar does not show anymore with Firefox in v6.8.0 HOT 5
- Incorrect Display of Participants Count in Calls with More than Three Participants in Web and Desktop Versions HOT 1
- Import not working HOT 1
- CSS code at top of the windows app after updating HOT 2
- Scrollbars are hard to see HOT 9
- Releases are not installable HOT 3
- Personal data in your emails to customer HOT 1
- Too Many Requests of e2e.updateGroupKey and e2e.getUsersOfRoomWithoutKey HOT 13
- Omnichannel Telegram can't receive a text file HOT 1
- Omnichannel Telegram blacklist support HOT 1
- Authentication on the device constantly resets HOT 1
- Application error: a client-side exception has occurred (see the browser console for more information). HOT 1
- Omnichannel Telegram can't send a zip file on Windows HOT 1
- Broken link HOT 4
- Quote reply below own text is irritating HOT 3
- rocket.chat is only showing former employees of the company that I have never talked to HOT 1
- support window notification HOT 7
- Migrate AWS SDK for JavaScript v2 APIs to v3 HOT 3
- Desktop app Icon not flashing upon new notificatoin in the taskbar when minimized [V4.0.0] HOT 1
- Rocket chat desktop version for Mac no longer works HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rocket.chat.