Unbounded userData directory growth in /tmp/snap.rocketchat-server

Since upgrading to RocketChat 3 we face the issue that the following directory on our server grows and grows, until it causes our monitoring to alert us:


The files that grow and grow, are json files containing all chat messages for some of the rooms. For example, GENERAL.json will fill up with all messages of our #general channel.

I see no reason why those files should exist, and indeed we’ve just been deleting them from time to time, without any adversary effects.

What would cause these files to exist?

Server Setup Information

  • Version of Rocket.Chat Server: 3.4.2
  • Operating System: Ubuntu 16.04
  • Deployment Method: snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Enabled
  • NodeJS Version: v12.16.1
  • MongoDB Version: 3.6.14
  • Proxy: Caddy
  • Firewalls involved: iptables