how to debug node.js causing 100% cpu usage?

You can profile your app with node-tick.

  1. Install node-tick by sudo npm -g install tick
  2. Run your app with enabled profile node --prof ./app.js
  3. After some time with CPU 100% usage stop your app
  4. You can see v8.log in your app directory, now you can read it with node-tick-processor
  5. Run node-tick-processor and explain the results
  6. Load v8.log into chrome://tracing to analyze as a tree.

node js cpu 100%

Leave a Comment