Two instances of Rocket.Chat leap to 100% CPU utilisation and after a while return to normal


I have two instances of Rocket Chat installed on two separate Digital Ocean droplets.

Both were installed using Snaps and installed independently of each other. Each has no activity and a maximum of three users configured. Only usage is the occasional API call on one as we are in early days of app development and no activity on the other. Every few days the CPU utilisation jumps to 100% and then drops back to normal after a variable period. Attached are usage maps for both showing last 14 days.

The peak CPU activity does not relate to any user or API activity on the platform.

We have not been able to captor top to see what resource is causing the issue or any other live logging details but we have now implemented alerts and hope to capture logging details when the problem happens again.

Server Setup Information

Droplet: 1 GB Memory / 25 GB Disk / LON1 - Ubuntu 20.04 (LTS) x64
Version: 3.12.1
Apps Engine Version : 1.23.0
Node Version : v12.18.4
Database Migration: 218 (March 26, 2021 9:56 AM
MongoDB: 3.6.14 / wiredTiger (oplog Enabled)
Deployment Method: SNAPS
Number of Running Instances: one in each droplet

Any additional Information

We will update once we have more information from top but welcome any thoughts anyone might have to investigate further.

Have just hit the issue again on one of my instances. No users accessing the system so obviously something wrong with the install. Managed to run a tops command this time while the problem existed and identified that mongoldb, caddy and node are the major culprits, consuming 69% of CPU between them with apt-check adding an extra 6%.

I’m expecting to see similar on the other droplet when the problem re-appears but now to investigate these services further. If anyone has seen similar problems with these services consuming a lot of CPU then welcome comment.