Post

Troubleshooting Java Memory Leaks in Production

When your app starts eating up heap, it’s time to break out the diagnostics.

Steps:

  • Collect heap dumps with -XX:+HeapDumpOnOutOfMemoryError
  • Use Eclipse MAT to analyze retained sets
  • Identify leak suspects and dominator trees

In our case, an executor service wasn’t being shut down — held on to task references.

Memory leaks love long-lived services. Clean up after yourself.

This post is licensed under CC BY 4.0 by the author.