Investigate Node.js high CPU issue in Linux app service

Click for: original source

When running your Node.js application in Azure Linux App Service, you may encounter High CPU consumption issue. By Hanli_Ren.

v8-profiler-node8 is one of the tools that can help us profile the CPU usage of a Node.js application. Normally, we need to explicitly insert code to control where to start and stop profiling in the application code. But for complex applications running in production mode, it’s hard to decide at which position of the code to start/stop profiling. Also, it will generate too many profiler result files if we continuously profiling a running App Service.

The article provides practical information on:

  • How to install and inject v8 CPU profiler in your Node.js application code
  • How to capture CPU profiler dump in Linux App Service
  • How to use Google Chrome Developer tools to analyze the profiler file

Together with bunch of screenshots and code examples so you can debug successfully. Good read!

[Read More]

Tags linux nodejs performance app-development azure