From OutOfMemoryError to Root Cause: Analyzing Clojure Heap Dumps
Santiago Cabrera
When a Clojure process runs out of memory, the JVM could give you a heap dump, but most Clojure developers have never opened one. This talk walks through my diagnostic process for finding memory leaks using Eclipse MAT, including how to map Java class names back to Clojure constructs and how to recognize the patterns that trip us up (memoized functions, go-loops capturing dynamic vars, unbounded registries growing during long-running REPL sessions). You will leave with a repeatable workflow for taking, opening, and analyzing heap dumps from any Clojure process. The talk concludes with an investigation whose fixes reduced memory usage of an internal test suite from up to 50GB to a couple of GB, plus a memory issue with clojure.core.cache that would be unfeasible to find without this heap dump analysis.
Santiago Cabrera
Lead Software Engineer at Nubank, where I've worked since June 2022 on the multi-service test infrastructure used across Nubank's Clojure services, a domain where memory profiling and REPL-driven development are daily concerns. I run Nubank's Engineering Excellence Tech Forum and recently spoke about Clojure at the BogotaJVM meetup, hosted at Oracle's offices for Java's 30th anniversary.