RocketChat / RocketChat/Rocket.Chat
Memory Leak on Message Sending and/or User/Room Creation
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
I am migrating a few old messages and chats over to RocketChat via the Rest API from an external server. I am using the Users Create, IM Create and Post Message endpoints to do so.
In the span of two hours, I've created 400 users, 200 rooms and sent about 10-15K messages to these endpoints. The RAM footprint of RocketChat has continuously grown from about 1.2GB to almost 3GB and it comes close to running out of the 4GB we have
Steps to reproduce:
- Start a Loop
- Create 2 Users
- Create a Room
- Post some messages to it
- See RAM continuously grow
Expected behavior:
This should not happen or at least go back to previous levels after a while.
Actual behavior:
Memory usage continuously grows and can only be returned to previous levels via reboot

Server Setup Information:
Docker
Client Setup Information
Desktop App or Browser Version: Browser, Chrome 99
Additional information
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the loop against the Users Create, IM Create, and Post Message REST API endpoints in the Docker setup, while monitoring RAM usage. Trace the server-side handling of those endpoints to identify what remains retained after repeated user, room, and message creation; done means memory no longer continuously grows under the reported workload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, typescript
- Domain
- api, backend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100