It started with a sluggish terminal. Commands that usually took milliseconds were lagging, and our monitoring alerts were screaming. The culprit? A server pinned at 100% CPU usage. Here is how we tracked down the issue and fixed it in seconds.
The Investigation
The first step was running the top command to see what was eating the resources. Sitting right at the top of the list was a specific process path:
/snap/wekan/1999/bin/node
This told us two things: first, the issue was being caused by Node.js. Second, because of the file path, we knew exactly which app was responsible: WeKan (the open-source Kanban board) installed via a Snap package.
The Fix: Stopping the Service
Instead of just killing the process ID—which would likely just result in the service restarting itself—we used the Snap management tool to shut it down gracefully. By running this command, we stopped the Node.js runtime and its associated database instantly:
sudo snap stop wekan
Within three seconds, the CPU load dropped from a flatlined 100% down to a healthy 2%. The server was breathing again.
Why This Happened
In this instance, the Node.js binary bundled with WeKan revision 1999 had hit a resource loop. By using the specific snap stop command, we were able to clear the process memory and stop the “noisy neighbor” from affecting other services on our Ubuntu machine.
Pro-Tip: If you find a service is constantly spiking your CPU, you can prevent it from starting on boot by using sudo snap disable wekan until you’ve had time to investigate the logs.
Leave a Reply