Reputation: 11
So we have a rather big J2EE web application (open source) deployed on WebLogic 12c (running on linux) and we're facing a "mysterious" memory leak.
Slowly over time the memory usage grows (i check the RES tab in top) until it dies from out of memory...
Heap size is set to Xmx4G, but within few hours of running it reaches 9G+ (again according to top RES).
If i dump the heap (jcmd, jmap) i get the dump file which is usually about 2G and exploring it does not reveal any useful info.
Forcing the garbage collector with jcmd, has no effect on RES tab.
Then i enabled the native memory tracking (jcmd), set the baseline, waited for app to reach 9G, then did the summary.diff (jcmd) which gave me this:
Total: reserved=5776MB +91MB, committed=4643MB +160MB
Which also did not tell me what using so much memory.
What else can i try to find the memory leak location?
Thanks!
Upvotes: 1
Views: 278
Reputation: 327
Detecting memory leaks requires using a combination of various tools and techniques. Some of the most common and effective ways are:
I hope you can find something here more relevant. https://rollbar.com/blog/how-to-detect-memory-leaks-in-java/
Upvotes: 1