RocketChat / RocketChat/Rocket.Chat
[performance] loadMissedMessages increased CPU load on all instances
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
Today I did a manual LDAP sync and during that sync all RC instances increased CPU and network load.
In that same time sporadically increased amount of loadMissedMessages method requests.
It look like some bug in server-client intercommunion (but maybe I'm wrong here)
Steps to reproduce:
Unknow
Expected behavior:
Normal load during rush hours
Actual behavior:



Server Setup Information:
- Version of Rocket.Chat Server: 3.16.3
- Operating System: CentOS7
- Deployment Method: docker
- Number of Running Instances: 20
- DB Replicaset Oplog: Emabled
- NodeJS Version: 12.22.1
- MongoDB Version: 4.2.15
Client Setup Information
- Desktop App or Browser Version: 3.2.3 and Chrome 93
- Operating System: Windows 10
Additional context
No
Relevant logs:
There was LDAP connection error, I don't know if it can be related
September 14th 2021, 09:30:59.000 s-rc-srv-03 server.js:204 LDAP ➔ Connection.error connection Error: read ECONNRESET errno: 'ECONNRESET', code: 'ECONNRESET', syscall: 'read'}
September 14th 2021, 09:30:49.000 s-rc-srv-03 rocketchat_rocketchat_4_1 server.js:204 LDAPSync ➔ error MongoError: cursor id 7274881890252097063 not found operationTime: Timestamp { _bsontype: 'Timestamp', low_: 400, high_: 1631601048 }, ok: 0, code: 43, codeName: 'CursorNotFound', '$clusterTime': { clusterTime: Timestamp { _bsontype: 'Timestamp', low_: 402, high_: 1631601048 }, signature: { hash: [Binary], keyId: [Long] } }}
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
No source file, test, or entry point is named. Start by reviewing the loadMissedMessages requests and LDAP sync logs around the reported CPU and network spike; done requires reproducing the issue, identifying the cause, and confirming that synchronization no longer creates abnormal load.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mongodb, nodejs
- Domain
- backend, databases, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100