Skip to content
Advertisement

Tag: memory-leaks

CMS GC – How to profile young gen heap?

I’m able to use jmap command to dump JVM memory heap. The issue is, I have a program with heavier young gen GC activities compared to the previous version when checking from the GC logs, and when I ran memory profiler, the biggest objects are always the ones in the old gen. So it makes troubleshooting more difficult when you

Java memory leak with a data source

I have heard many times that not closing database connections might lead to a memory leak. (For example in this article) I tried reproducing the same issue by getting a connection from org.apache.commons.dbcp2.BasicDataSource and not closing it. This is my code: I have repeated the same process almost 400 times and also decreased the initial and max heap sizes. Still,

Advertisement