-
1. Re: Can't locate memory leak - possibly cache?
peterj Jun 15, 2010 5:21 PM (in response to mglowacki)1 of 1 people found this helpfulMichal (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
at http://www.cmg.org/cgi-bin/search.cgi?q=java+peter+johnson&x=30&y=10
-
2. Re: Can't locate memory leak - possibly cache?
mglowacki Jun 16, 2010 12:43 AM (in response to peterj)hi Peter,
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,
Michal
-
3. Re: Can't locate memory leak - possibly cache?
mglowacki Jun 17, 2010 10:42 AM (in response to mglowacki)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).
-
4. Re: Can't locate memory leak - possibly cache?
peterj Jun 18, 2010 6:40 PM (in response to mglowacki)Since this appears to be JBoss Messaging related you might want to raise the issue in the Messaging forum (and refer them back to this post).
-
5. Re: Can't locate memory leak - possibly cache?
samuel.cai Jun 23, 2010 2:38 AM (in response to mglowacki)1 of 1 people found this helpfulMichal, do you have same issue when running with JBoss 4?
If no, then you may check this: https://jira.jboss.org/browse/JBVFS-159
-
6. Re: Can't locate memory leak - possibly cache?
mglowacki Jun 24, 2010 4:39 AM (in response to samuel.cai)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...
-
7. Re: Can't locate memory leak - possibly cache?
samuel.cai Jun 24, 2010 9:39 PM (in response to mglowacki)You can try on JBoss 4.