

Implement a method that exits the nodejs process To configure this profiler on App Service Linux you need the following steps:

Important: This flag was incorporated in Node.js >=12 versions. You can run a V8 heap profiler on startup and writes the heap profile to disk before exit. In this category you will find the following profilers: node –heap-prof A disadvantage is that you can’t profile specific function or code, it will profile the entire application for that you might need to use Third-Party profilers. The advantage of these profilers is that you don’t need to install any library or configure in your package.json, these profilers options uses the V8 Profiler HeapProfiler/HeapSnapshot classes. Some of them are installed for specific node.js version. These profilers are part of the Node.js installation. You can find information for High CPU in this reference. These profilers can be divided in two main categories: Built-in profilers and Third-Party Profilers. For those scenarios you can configure a Node.js profiler for your application. When dealing with High Memory scenarios in App Service Linux, the best recommendation is to profile your app in your local environment, but sometimes it is hard to reproduce the issue specially not having the same request load or environment. Troubleshooting Node.js High Memory scenarios in App Service Linux
