An adventure with a memory leak in Node

  1. If you do anything with large documents in node, remember that retaining any substr of it will retain the whole document — be careful.
  2. We didn’t actually need this feature of caching the compiled template, and in some respects don’t need the full power of a templating engine to parse the declarations — I should probably have looked deeper under the hood when selecting it and may still replace it with a simpler parser.
  3. Load testing to look for memory leaks must be able to replicate real production traffic — not always easy to do.
  4. Being able to perform heapdumps in live is invaluable — we’re going to automate it in future.

--

--

--

CTO @ Infinitas Learning, avid technologist and husband to Sally.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Clifton Cunningham

Clifton Cunningham

CTO @ Infinitas Learning, avid technologist and husband to Sally.

More from Medium

CS371p Spring 2022 — Week4 Blog: Yash Patil

The Startup Reset, Part II: Russian Styx

Pitt Game Preview

CS371p Spring 2022: Raju Kakarlapudi