RocketChat / RocketChat/Rocket.Chat

High CPU on Node app

Open
#13,461 24 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

Issue with members connecting to the server. Some members cannot connect (just reload) when login-in. Some members are disconnected even login for a long time. Checking by top command we see that node application hogs 100%+ CPU. Restarting the Rocket.Chat server seems to temporarily solve the problem. But after a day or 2 we notice a very same issue, which restarting temporarily fix the problem.

Steps to reproduce:

From our observation: doing search from private chats or group chats seems to peak the CPU.
Although it normalize for a few minutes. But this is not an issue from the previous version of Rocket.Chat via Snap Installation 72.3.

Actual behavior:

top command screenshot
node application is at 100%+ CPU

image

Server Setup Information:
  • Version of Rocket.Chat Server: 0.74.2
  • Operating System: Ubuntu 16.04.2 LTS
  • Deployment Method: manual install
  • Number of Running Instances: 1
  • DB Replicaset Oplog: N/A
  • NodeJS Version: v8.11.3
  • MongoDB Version: db version v3.6.10
Additional context
Relevant logs:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported CPU spike during private or group chat searches using the listed Rocket.Chat, Ubuntu, Node.js, and MongoDB setup, while collecting server logs and profiling data. Done means the cause of the sustained high CPU and connection failures is identified, addressed, and covered by a regression check.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb, node.js, ubuntu
Domain
backend, databases, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.