RocketChat / RocketChat/Rocket.Chat
LDAP Auto Logout runs at high CPU load forever
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
Running LDAP Premium feature Enable Auto Logout causes indefinite 60 - 85 % CPU load.
This issue is a stub where I'll add anything I can find about it. It may be that the cause is simply badly refined LDAP attributes, as the defaults for advanced sync are *,+ meaning it combs through everything for every account.
Steps to reproduce:
- Follow CPU load of RC processes on the server.
- Enable
Admin -> Settings -> LDAP -> Premium -> Auto Logout Deactivated Users -> Enable Auto Logout. - Default setting is 5 minutes. Increase this to a very long time such as 3600 minutes (60 hours). Save the settings.
- Disable auto logout. Save.
- Enable auto logout. Save.
Expected behavior:
Auto logout triggers once. After the state of all users have been combed through excess CPU load should end until the next interval.
Actual behavior:
The excess CPU load continues indefinitely.
Disabling the auto logout feature immediately stops the load.
Server Setup Information:
- Version of Rocket.Chat Server: 6.8.0
- Operating System: RHEL8
- Deployment Method: tar
- Number of Running Instances: 4
- DB Replicaset Oplog: Yes
- NodeJS Version: 14.21.3
- MongoDB Version: 5.0
Additional context
Might be triggered only with several hundreds of accounts in LDAP.
Relevant logs:
No actual errors hits the eye in DEBUG level rocketchat service log.
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 file or test is named. Start by reproducing the issue through LDAP Premium’s Enable Auto Logout setting and the stated interval workflow while monitoring Rocket.Chat CPU usage and DEBUG logs; done means auto logout processes users once per interval and the excess CPU load stops until the next interval.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100