# Slow self-hosted server

**URL:** <https://forums.rocket.chat/t/slow-self-hosted-server/6186>\
**Category:** Community Support\
**Created:** [March 23, 2020, 5:52pm UTC](https://forums.rocket.chat/t/slow-self-hosted-server/6186 "2020-03-23T17:52:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![2Heavy](https://avatars.discourse-cdn.com/v4/letter/2/d07c76/32.png) [@2Heavy](https://forums.rocket.chat/u/2Heavy)\
**Post date:** [March 23, 2020, 5:52pm UTC](https://forums.rocket.chat/t/slow-self-hosted-server/6186/1 "2020-03-23T17:52:19Z")

</div>

### Description

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 ([https://rocket.chat/docs/installation/manual-installation/ubuntu/](https://rocket.chat/docs/installation/manual-installation/ubuntu/))
- 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

---

<div class="post-metadata">

**Author:** ![diego.sampaio](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/diego.sampaio/32/31_2.png) [@diego.sampaio](https://forums.rocket.chat/u/diego.sampaio)\
**Post date:** [April 15, 2020, 10:33pm UTC](https://forums.rocket.chat/t/slow-self-hosted-server/6186/2 "2020-04-15T22:33:54Z")

</div>

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 rocket.chat instances behind a load balancer.

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

---

<div class="post-metadata">

**Author:** ![2Heavy](https://avatars.discourse-cdn.com/v4/letter/2/d07c76/32.png) [@2Heavy](https://forums.rocket.chat/u/2Heavy)\
**Post date:** [April 24, 2020, 1:59pm UTC](https://forums.rocket.chat/t/slow-self-hosted-server/6186/3 "2020-04-24T13:59:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![diego.sampaio](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/diego.sampaio/32/31_2.png) [@diego.sampaio](https://forums.rocket.chat/u/diego.sampaio)\
**Post date:** [April 24, 2020, 2:35pm UTC](https://forums.rocket.chat/t/slow-self-hosted-server/6186/4 "2020-04-24T14:35:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![2Heavy](https://avatars.discourse-cdn.com/v4/letter/2/d07c76/32.png) [@2Heavy](https://forums.rocket.chat/u/2Heavy)\
**Post date:** [April 28, 2020, 2:16pm UTC](https://forums.rocket.chat/t/slow-self-hosted-server/6186/5 "2020-04-28T14:16:54Z")

</div>

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