-
1. Re: PermGen issues using EJB 3.0 on Jboss 4.2.2.GA
sairamvla Aug 22, 2008 11:35 AM (in response to sairamvla)Please help.
I am using javassist in ejb 3 deployer.
hibernate.bytecode.provider=javassist -
2. Re: PermGen issues using EJB 3.0 on Jboss 4.2.2.GA
sairamvla Aug 22, 2008 11:35 AM (in response to sairamvla)I have default perm size (64).
-
3. Re: PermGen issues using EJB 3.0 on Jboss 4.2.2.GA
peterj Aug 22, 2008 3:49 PM (in response to sairamvla)A permsize of 64M is probably too small for an EJB3 app. You should increase it to 128m or 256m. If it then still runs out of permgen, then then you should worry.
You can easily watch the usage of the permgen using JConsole or VisualVM. -
4. Re: PermGen issues using EJB 3.0 on Jboss 4.2.2.GA
sairamvla Aug 22, 2008 6:49 PM (in response to sairamvla)I assume increasing max perm size will make server run more longer. Am I correct? Server is throwing perm gen out of memory errors after running for one week and we have to restart it. Our EJB application is continuosly accessed by many users.
-
5. Re: PermGen issues using EJB 3.0 on Jboss 4.2.2.GA
sairamvla Aug 22, 2008 10:07 PM (in response to sairamvla)Perm gen is increasing like anything.
Please suggest how to fix it. I tried cglib also.
hibernate.bytecode.provider=cglib
Am I missing anything? -
6. Re: PermGen issues using EJB 3.0 on Jboss 4.2.2.GA
jaikiran Aug 23, 2008 4:23 AM (in response to sairamvla)Did you try using JConsole, as suggested by Peter?
-
7. Re: PermGen issues using EJB 3.0 on Jboss 4.2.2.GA
peterj Aug 25, 2008 2:05 PM (in response to sairamvla)What is your rate of increase? I am seeing that after about 1600 business transactions (each transaction involves a number of individual requests, each of which uses a small number of session beans and a small to very large numbers of entity beans), the permgen has gone from about 44M to about 49M.
-
8. Re: PermGen issues using EJB 3.0 on Jboss 4.2.2.GA
sairamvla Aug 25, 2008 3:11 PM (in response to sairamvla)Peter,
I have increase in the same way as you. After aroung 250 invocations, it is raising to 50M from 43M.
Please suggest how to fix this? Lot of permgen consumed by java classes only. I used profiler.
Thanks,
Sai -
9. Re: PermGen issues using EJB 3.0 on Jboss 4.2.2.GA
peterj Aug 25, 2008 5:35 PM (in response to sairamvla)I ran another 5600 business transaction. My pergen size hovered around 48MB to 50MB (it would increase to 50MB and when I hit a full GC it was reduced to 48MB, at which point it would increase again unti lthe next full GC).
Therefore, it would appear that there is an initial, substantial, increase in permgen usage when the EJBs are first used, after which the size increase is greatly reduced. I imagine that the amount of the increase depends on the number of different EJBs are deployed. -
10. Re: PermGen issues using EJB 3.0 on Jboss 4.2.2.GA
sairamvla Aug 25, 2008 5:39 PM (in response to sairamvla)Thanks Peter. How did you hit Full GC?
-
11. Re: PermGen issues using EJB 3.0 on Jboss 4.2.2.GA
sairamvla Aug 25, 2008 5:52 PM (in response to sairamvla)Might be a dumb question. I have a stateful session bean calling multiple entity beans. Is there any way I can free these beans after calling? How to do GC for these?
-
12. Re: PermGen issues using EJB 3.0 on Jboss 4.2.2.GA
peterj Aug 25, 2008 6:41 PM (in response to sairamvla)I was surprised when I hit full GC because the tenured generation at only 37% in use, until I realized that I had been running for an hour. It was the sun.rmi.dgc.client/server.gcInterval settings - they are set to run full GC every hour.
You do not want to manually force a collection - that could cause performance problems. Eventually, your tenured generation will fill up and you will hit a full collection. Even without a full collection, the JVM will occasionally free classes that are no longer used, thus reducing the size of the permgen. Set the -XX:+TraceClassUnloading option to see this.