1 of 1 people found this helpful
Michal (or Franics), do you want me to answer you here or in the other forum where you posted this question?
Let's try here. Usually, I use two mechanisms to determine if there is a memory leak. First, I monitor the space left after a major garbage collection. After a decent wram up interval, I expect that the port major GC heap usage will have stabilized. If it does not and continues to increase, then I suspect a memory leak.
The other mechanism I use is to use VisualVM to take multiple memory snapshot and compare them. It will tell me which objects have increased in count, which then helps me to pinpoint the problem.
For suggestions on how to gather GC data and analyze it (which will show you the heap size after major GC), see these white papers:
Java Garbage Collection Statistical Analysis 101
Java Garbage Collection Performance Analysis 201
this forum is fine Thanks for the tips, I will try and get back. From my recent tests I am bit confused why my OldGen is growing up to 3gb and is never collected. I will also look into suggested whitepapers.
Thanks for now,
looks like the problem is this ReadWriteLock, using another memory dump and then GC Roots looks like it,s created by:
state of org.jboss.jms.client.delegate.ClientConsumerDelegate [Stack Local]
<local variable> of java.lang.Thread [Stack Local, Thread] "Connection Consumer for dest JBossTopic[Alerts] id=2"
When I have opened jmx-console I have above 1600 nondurable subscriptions! I don't know now if I misuse MDB or is it JBoss Messaging bug (I found some issues over the web).
well, among with JBoss version upgrade I rewritten half my applications, so it's not that easy to say. With JBoss 4.2.3 was fine, also not that many vfs (ok, no vfs at all in jboss 4 :))/zipentries so it could be what you suggest. Thanks, I will try with this one as well.
For now system works fine, however java.exe process grows from 2GB at the beginning to 4,7GB in two days... And all objects retaining memory are Object and (Concurrent)HashMaps, what basically tells me nothing. Taking from GC Roots shows some FontLoader classes or ZipEntryHandlers...
You can try on JBoss 4.