How I nailed down a memory leak in an Akka application

Recently, a project I was working on experienced a memory leak problem. I used JVM verbose GC log, GCeasy.io, Eclipse Memory Analyzer (MAT), and IntelliJ to figure out the root cause of the problem and fixed it.

While monitoring our distributed Akka application, I noticed that one of the Akka micro-service spills out warnings of “slow heartbeat”, which suggests a look into the slow GC of the JVM.

First, I turned on verbose GC on the JVM running the problematic micro-service, with the help of GCeasy.io, I could…