Memory Chronicles: Manage, Trace and Fix Memory Leaks

Memory Chronicles: Manage, Trace and Fix Memory Leaks

Talk at Node+JS Interactive 2019

8cf49d39d44f100e1afed5c5a259fed4?s=128

Giovanny Gongora

December 12, 2019
Tweet

Transcript

  1. Memory Chronicles: Manage, Trace and Fix Memory Leaks Giovanny Gongora

    @Gioyik
  2. Giovanny gio@nodesource.com @gioyik

  3. © 2019 NodeSourc e What is this really?

  4. © 2019 NodeSourc e See you at 2pm!

  5. Who had a memory issue with a Node.js application before?

  6. It happens in real life, happens in TNT

  7. Heap profiler & Timeline

  8. When to use them?

  9. Workflow for diagnosing memory leaks?

  10. TST

  11. Three Snapshot Technique

  12. What do the Shallow and Retained Size columns represent?

  13. Where should I start digging into to discover if I

    have a leak?
  14. Redacted snapshots

  15. Core Dumps

  16. Create a Core dump

  17. --abort-on-uncaught-exception

  18. LLDB

  19. Llnode

  20. Caveats

  21. llnode’s coupling to V8

  22. Promises (?)

  23. Async / Await FTW!

  24. Tips for different situations

  25. Case #1: Server Side Rendering (SSR)

  26. Case #2: Monitoring tools

  27. Case #3 Close your connections

  28. Case #4: Look for agnostic serve pages solution

  29. Case #5: Review you <THIS-to-THIS> packages

  30. Case #6: Keep naming you functions

  31. Case #6: Check how reliable are your 3rd services

  32. Crazy … right?

  33. Thank you!