Server CPU overload - how to best diagnose this issue

I am new to node and the whole node environment.
I need some help diagnosing server performance issues.
I am hosting 3 apps on the server, none get any usage at all, just side projects to learn more.

There is nothing I am aware of which triggered that spike, and once it happened I could only get to the server by forcing a reboot in the Digital Ocean console.

One of my apps was broken after the reboot.
I have since redeployed it and it works fine.
That was the only app I didn’t have connected to Kadira, so I don’t have any stats or reports from there.

You can use the Kadira CPU profiling: https://kadira.io/cpu-profiling. It is super easy to use.

@Sanjo thanks, I will add the CPU profiling to all the apps.

What if Kadira didn’t exist, how would you check the health of a Node application, and diagnose issues.
See the weird thing is all those apps on my server were running fine for weeks on end… something triggered it and it crashed and took the whole CPU.

There are other services available for Node.js too. https://nodetime.com/ and http://newrelic.com/ for example.

But fortunately Arunoda created such a service specific to Meteor apps which allows you to get a more fine grained picture of you app. :smile:

1 Like