There are many tools out there, which diagnostics tools are good for diagnostic memory leak issues for node.js applications?
What diagnostic tools are available for Node.js applications?
808 Views Asked by mouse smart At
2
There are 2 best solutions below
0
hohoho
On
module https://www.npmjs.com/package/appmetrics but it is more for monitoring and profiling. You can check it out, it is useful.
Related Questions in NODE.JS
- How to solve CERT_UNTRUSTED error in nodemailer
- Run a loop over a callback, node js
- Implementing prerender.io middleware in sails.js
- Token based authorization in nodejs/ExpressJs and Angular(Single Page Application)
- formatting path string in javascript
- One to One screensharing using WEBRTC
- Create polygon from grid (for collisions)
- Strange npm behavior when installing packages like grunt
- Convert JSON.gz to JSON in node js
- "Your npm version is outdated." but it's not. While install yo
- Why put methods on the prototype of a class instead of declaring them in the constructor?
- Node JS Async Response
- mongoose get property from nested schema after `group`
- Cannot Receive Incoming call on Twilio android Client
- How can I change a specific line in a file with node js?
Related Questions in MEMORY-LEAKS
- Python Memory Leak - Why is it happening?
- how to resize image properly without memory warning
- Ruby leaked objects are referenced by RubyVm::Env
- Why the private package String constructor (int, int, char[]) has been removed?
- Use static analysis tools to check null pointers and memory leaks in Linux device drivers
- No warning on deleting a forward declared pointer (Visual Studio)
- Unity c# List memory leak
- UIDatePicker memory leak in IOS 8.3
- PHP UDP socket memory leak
- nodejs , socket.io simple code memory leak
- Memory Leak using an UIAlertController in Swift
- valgrind shows me a leak when using libxml2
- cuda-memcheck fails to detect memory leak in an R package
- Memory Leaks and GridView
- Unable to spot Memory leak issue in below code
Related Questions in DIAGNOSTICS
- What diagnostic tools are available for Node.js applications?
- Importing and exporting to a text file - Python
- How to calculate TP, FP, TN, FN using only N and 4 relationships between the cells?
- R: logistic regression using frequency table, cannot find correct Pearson Chi Square statistics
- MongoDB Sharded, Replica'd Cluster, Query commands for all configuration / running statuses?
- How to get process "type" (App, Background Process, or Windows Process)
- How do I specify UseDevelopmentStorage=true for azure 2.5 sdk web role diagnostics
- Get-Content and show control characters such as `r - visualize control characters in strings
- IIS Analytics and Diagnostic Logging
- Improving diagnostics with the help of static_assert
- Is it possible to run a software program (for example autocad) with C# without exact file path?
- Typescript takes ~30 minutes to compile single file (~600 lines)
- Printing a PDF from a Windows Service using GhostScript - How to diagnose permission issue
- "pragma GCC diagnostic ignored" has no effect if it's defined in PCH?
- CRM 2011 find out which batch process last changed a record
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Yes, IDDE is a powerful tool not only for memory leak detection, but for a wide variety of problem determination of Node.js misbehaviors, including crashes and hangs.
Here is the link for overview, installation, and what is new information: https://www.ibm.com/developerworks/java/jdk/tools/idde
!nodeoverview {
Heap and Garbage Collection
Memory allocator, used: 981 MB, available: 482 MB GC Count: 144
This shows up the occupancy of the heap.
Then, use jsmeminfo to figure out the predominent resident objects in the heap.
!jsmeminfo {
Memory allocator, used: 981 MB, available: 482 MB Total Heap Objects: 21559924
Largest 5 heap objects Type Size (bytes) More information
0x00000000de06d319 FIXED_ARRAY_TYPE 131112 !array 0x00000000de06d319 0x00000000de0ac6d9 FIXED_ARRAY_TYPE 98360 !array 0x00000000de0ac6d9 0x00000000e90e2f09 ASCII_STRING_TYPE 48152 !string 0x00000000e90e2f09 0x00000000e9035099 ASCII_STRING_TYPE 48088 !string 0x00000000e9035099 0x00000000e9004101 ASCII_STRING_TYPE 40936 !string 0x00000000e9004101
Most Frequent 5 object types Frequency
JS_OBJECT_TYPE 15371393 FIXED_ARRAY_TYPE 6175379 ASCII_INTERNALIZED_STRING_TYPE 3476 BYTE_ARRAY_TYPE 1572 JS_FUNCTION_TYPE 1434
}
Review the application based on this information and see they holding up the memory as shown is justified or not.
If you want to 'dissect' the objects further to see the content, use object expansion commands such as !jsobject or !array:
!array 0x00000000de06d319 {
Array type : FIXED_ARRAY_TYPE Len : 16387 Showing first 100 elements only 0 : 0xd9400000000 (SMI) 1 : 0x3fe00000000 (SMI) 2 : 0x400000000000 (SMI) 3 : 0x9a1103d1 (ASCII_INTERNALIZED_STRING_TYPE : !print 0x000000009A1103D1 ) 4 : 0x9a1042a9 (ASCII_INTERNALIZED_STRING_TYPE : !print 0x000000009A1042A9 ) ... }
If you want to 'segregate' the entire heap into sections based on object's internal types, user jsgroupobjects. This is more useful when you have multiple dumps taken at different time intervals, and want to compare which objects grew over time.
!jsgroupobjects {
Representative Object Address Object Type Num Objects Constructor Num Properties Properties
!jsobject 0x00000000c8244fd1 JS_OBJECT_TYPE 6133503 Object 0
!jsobject 0x00000000c8004161 JS_OBJECT_TYPE 6133499 Database 0
!jsobject 0x00000000c8004101 JS_OBJECT_TYPE 3066750 MyRecord 0
!jsobject 0x00000000c869b111 JS_OBJECT_TYPE 37302 Object 0
!jsobject 0x00000000de05b959 JS_FUNCTION_TYPE 542 0
!jsobject 0x00000000de04bcc1 JS_FUNCTION_TYPE 267 0
!jsobject 0x00000000de04aa09 JS_FUNCTION_TYPE 251 0
!jsobject 0x00000000de04a911 JS_FUNCTION_TYPE 227 0
!jsobject 0x00000000de0a48c9 JS_ARRAY_TYPE 190 Array 0
!jsobject 0x00000000de04a7e9 JS_FUNCTION_TYPE 102 0
!jsobject 0x00000000de04e379 JS_ARRAY_TYPE 34 Array 0
!jsobject 0x00000000de050db1 JS_OBJECT_TYPE 30 Object 0
!jsobject 0x00000000c2938151 JS_REGEXP_TYPE 18 RegExp 0
!jsobject 0x00000000c2955a11 JS_OBJECT_TYPE 15 NativeModule 0
!jsobject 0x00000000c2944519 JS_OBJECT_TYPE 11 Object 0
!jsobject 0x00003abc617bee71 JS_OBJECT_TYPE 102 CallSite 3 receiver, fun, pos
If you want to examine a single object, do jsobject on the object address.
!jsobject 0x00003abc617bee71 {
Object has fast properties Number of descriptors : 3
Name Value More Information
receiver 0x0000251abe506c91
fun 0x00003abc617bb241 pos 0x00001dfd00000000 SMI = 0x1dfd
}