Cannot upload a file larger than 30MB

Running into an issue where mongodb (GridFS) isn’t accepting a file upload larger than 30MB. Using Snap and honestly have no idea how to edit mongodb values.

Error:

Exception while invoking method 'ufsComplete' { MongoError: Executor error during find command: OperationFailed: Sort operation used more than the maximum 33554432 bytes of RAM. Add an index, or specify a smaller limit. at queryCallback (/snap/rocketchat-server/1399/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/cursor.js:248:25) at /snap/rocketchat-server/1399/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:532:18 at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickDomainCallback (internal/process/next_tick.js:218:9) ok: 0, errmsg: 'Executor error during find command: OperationFailed: Sort operation used more than the maximum 33554432 bytes of RAM. Add an index, or specify a smaller limit.', code: 96, codeName: 'OperationFailed', name: 'MongoError', [Symbol(mongoErrorContextSymbol)]: {} }

  • Version of Rocket.Chat Server: 1.3.2
  • Operating System: Ubuntu 18.04
  • Deployment Method: Snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog: n/a
  • NodeJS Version: 8.11.4
  • MongoDB Version: 3.4.20
  • Proxy: nginx

Thank you for any/all help!

To be clear, the system has enough RAM to cover the upload. It fails at 100%.

I think this is an Issue in Mongo itself.

“Sort operation used more than the maximum 33554432 bytes of RAM. Add an index, or specify a smaller limit”

GridFS is ok for a low volume of small files but it is useless for anything larger really.

You should really be using local file storage, Minio or one of the other storage methods.