~/talk

Finding memory leaks and CPU bottlenecks with Node.js debug tools

Talkat Geekle Free Online DevOps+JS Conference 2020 · on Tuesday, 2020-04-07· [nodejs]
slides:none on file

Walks through connecting Node.js to Chrome DevTools with --inspect or sending kill -USR1 to an already running PID, and using SSH port forwarding to debug a Heroku dyno. Takes heap snapshot comparisons with Chrome’s Memory panel (heap grows from ~70MB to ~170MB, ~2,088 new IncomingMessage objects) to find requests stored in a forgotten map; uses CPU profiler to show a regex consuming ~10s of CPU on the call stack. Demos work end-to-end and produce actionable fixes: stop retaining req/res objects and replace or sandbox the long-running regex.

AI-written summary · about

  1. 0:00Introduction
  2. 3:43Connecting to V8
  3. 11:28Remote debugging demo
  4. 20:15Memory leak analysis
  5. 32:07CPU bottleneck analysis
  6. 38:04Best practices and wrap-up
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.