Slow self-hosted server


I have a self hosted Rocket.Chat server on amazon instance, the instance is already on type t3.large and the chat is very slow, to type and on rocketchat react-native app is slow to load big audios too, but the bigger issue is the typing on the channel too slow. I have others websites bigger on other instances with type t3.medium and is not that slow, so I’m not very sure the server config is the problem.
Need urgent help, my boss is on me because of this typing thing, please!

Server Setup Information

  • Version of Rocket.Chat Server: 2.2.0
  • Operating System: Ubuntu “18.04.4 LTS (Bionic Beaver)”
  • Deployment Method: Manual (
  • Number of Running Instances: 1
  • DB Replicaset Oplog: What?
  • NodeJS Version: 8.11.4
  • MongoDB Version: 4.0.13
  • Proxy: nginx 1.14.0
  • Firewalls involved: Amazon security groups

Any additional Information

Number of users on channel: 252
Number of registered users: 724

RAM: 8gb
CPU: (lscpu output)
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 2
On-line CPU(s) list: 0,1
Thread(s) per core: 2
Core(s) per socket: 1
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 85
Model name: Intel® Xeon® Platinum 8175M CPU @ 2.50GHz
Stepping: 4
CPU MHz: 2499.998
BogoMIPS: 4999.99
Hypervisor vendor: KVM
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 1024K
L3 cache: 33792K
NUMA node0 CPU(s): 0,1

It looks like your server specs are not good enough to handle that amount of users… The number of concurrent users is the most important, if we don’t know the real data we usually work with 30% of total users as the average of concurrent users, in your case 724 * 30% = 217

To better handle that amount of users I’d recommend having two instances behind a load balancer.

You didn’t mentioned where is your MongoDB server, but for sure it should live in a separate VM.

Thanks for the reply Diego, this was one of the issues, but the main problem actually was the number of chats listed on the left side. For every user that registers I send a message, so the list was enormous and I limited via code. I don’t known if there is an option to limit this list via admin configs, but if there is would come in handy.
Thanks for the help.

Ok, got it… We don’t have a setting to limit the amount of chats on that list right, we have talked internally on adding a preference to hide chats after a period of time without activity, but we haven’t decided nothing on that matter, so there no official plans to implement that.

but if you send them a message in an automated way, you could also hide the chat after sending a message via the websocket API by calling “hideRoom(roomId)”… we’re missing a REST API for that, but we can add for next release.

Thanks Diego. About that two rocketchat instance behind a load balancer, there is a tutorial for doing that?