Node js applications diagnostics under the hood
summary
Shows a concrete production workflow: create core dumps selectively with gencore to fork and dump without killing the main process, extract stack and request data with llnode and node-report and match X-Transaction-ID from logs, and find memory holders with V8 GC tracing plus heap/core inspection. Uses 0x flame graph to pin a 65% server‑rendering hotspot down to 15% and reports overall performance improvement of about 50%, plus tactics for Event Loop lag, GC stalls and Async Hooks tracing.
AI-written summary · about
chapters (30)
- 0:00Intro
- 0:32Customers in retail domain
- 0:52Stages of Node.js diagnostics evolution before 2017
- 2:24The third stage of Node.js diagnostics evolution
- 3:01V8 engine update
- 3:40Node.js in Enterprise Architecture
- 4:18Debugging in production
- 4:44Example
- 5:29Core dump creation algorithm for postmortem debugging
- 5:43Debugging steps
- 6:04Get the StackTrace and find the last JS function
- 6:45Read the source code of the function
- 6:55Get input parameter - request
- 7:29Case 1. Informative Stack Trace
- 7:47Case 2. Unhandled rejection
- 8:19Case 2. Uninformative StackTrace
- 8:40Case 2. Finding all reg object instances
- 8:57Case 2. Which request crashed the process
- 9:07Case 2. List of the killed requests in current process
- 9:37Case 2. Search request by address of headers object
- 10:06Search for local variables
- 11:22Errors in production
- 12:37Error handler with Error Registry and gencore
- 13:17Core dump creation algorithm in production
- 15:12Profiling node --profiler + apache bench/JMeter
- 16:26Data processing
- 17:03Performance improvements
- 18:18Memory grows
- 18:33Case: Excessive garbage collection, The creation a lot of new objects
- 19:30Case: Scavenge GC in New Space.
related talks
57mTroubleshooting Node.js Applications Under the Hood
28mPost mortem NodeJS debugging
50mDebugging Node.js in Production
50mPost-Mortem Debugging in Node.js
38mWelcome to Mordor! Hunting Performance Issues in Node.js.
23mThrow Me a Lifebuoy: Debugging Node.js in Production with Diagnostic Reports
16mNode.js Diagnostic Best Practices
28mDiagnostic Tooling - Be Ready when Things Go Wrong in Production
