RocketChat / RocketChat/Rocket.Chat
Crashing Rocket Chat server - chat kernel: Out of memory: Kill process
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
Chat Process get Killed
Steps to reproduce:
Can not reproduce, it is crashing random. sometimes one time in 3 days, other time 3 times per day
Server Setup Information:
Server has 8GB Ram and only 4 GB in use
- Version of Rocket.Chat Server: latest
- Operating System: Ubuntu 18
- Deployment Method: manual install
- Number of Running Instances: 1
- DB Replicaset Oplog: yes
- NodeJS Version: nodejs -v showing v12.22.1 but in Rocket Chat Administration 14.0.0
- MongoDB Version: 4.4.12
Relevant logs:
May 16 19:39:09 chat kernel: Out of memory: Kill process 4676 (node) score 512 or sacrifice child
May 16 19:39:09 chat kernel: Killed process 4676 (node) total-vm:9036244kB, anon-rss:4652952kB, file-rss:0kB, shmem-rss:0kB
SWAP
root@chat# swapon -s
Filename Type Size Used Priority
/dev/sda5 partition 998396 0 -2
cat /proc/meminfo
MemTotal: 8168388 kB
MemFree: 1422060 kB
MemAvailable: 3890404 kB
Buffers: 119192 kB
Cached: 2530440 kB
SwapCached: 0 kB
Active: 4430584 kB
Inactive: 1859156 kB
Active(anon): 3640648 kB
Inactive(anon): 2456 kB
Active(file): 789936 kB
Inactive(file): 1856700 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 998396 kB
SwapFree: 998396 kB
Dirty: 224 kB
Writeback: 0 kB
AnonPages: 3640104 kB
Mapped: 280176 kB
Shmem: 3000 kB
Slab: 185124 kB
SReclaimable: 85924 kB
SUnreclaim: 99200 kB
KernelStack: 7264 kB
PageTables: 190880 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 5082588 kB
Committed_AS: 16832776 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 96128 kB
DirectMap2M: 5146624 kB
DirectMap1G: 5242880 kB

Thanks for any help or tips
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 with the reported kernel OOM log, then review the supplied swapon -s and /proc/meminfo output alongside the Rocket.Chat, Node.js, and MongoDB versions. No source file or test is named; the investigation is complete when the memory-growth cause is confirmed and the server no longer reaches an OOM kill.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mongodb, node.js, ubuntu
- Domain
- backend, databases, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100