-
1. Re: PermGen leak when passing detached entities over remote
dcracauer Sep 30, 2006 9:55 AM (in response to stnor)I think we're seeing it too. I have a process that I can run that makes my server use up 128m of PermGen space in about an hour. I haven't put together a test case I can send to JBoss yet. Do you have one?
-
2. Re: PermGen leak when passing detached entities over remote
clebert.suconic Oct 2, 2006 11:02 AM (in response to stnor)Is it possible you provide the testcase?
I have tried replicating this and I didn' t have much success. (just assumed it wasn' t a bug)
I won' t be working on this issue any more, but someone from Hibernate/EJB3 would certainly be involved.
Clebert -
3. Re: PermGen leak when passing detached entities over remote
stnor Oct 3, 2006 3:23 AM (in response to stnor)I can try to get a testcase on this. I spent an hour tring last week but had no success.
-
4. Re: PermGen leak when passing detached entities over remote
pmpm Oct 3, 2006 10:16 AM (in response to stnor)I also have observed this leak, take a look at this topic:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=84255
As far as I observed, the leak is caused by the following sequence of operations:
- querying server for entities and obtaining them via rmi to the remote java client
- constucting new entity having collection of those detached entities on the client side
- sending object with the collection to the server and persisting it (detached entities are reloaded into current session with EntityManager.find() or getReference)
Pawel Miniewicz -
5. Re: PermGen leak when passing detached entities over remote
stnor Oct 6, 2006 10:21 AM (in response to stnor)Is there anyone working on fixing this? JIRA id?
-
6. Re: PermGen leak when passing detached entities over remote
ptabor Oct 10, 2006 7:28 AM (in response to stnor)I got the same problem...
PermGen in EJB3 client aplication by remote interface.
The application is as sample as it can be:
-get remote interface of stateless EJB3 (by JNDI)
- ask 1000 times to get a Collection of 10 EntityBeans.
After 255 there is OutOfMemory: PermGen.
JVM options changes nothing (eventualy more PermSpace => longer run).
The reason looks like the Javassist create lazyinitializer classes for every EntityBean retrived from the server.
So: When I debug on server-side, I got before sending Entity to client:
I got:
myEntity[0].id=143534
myEntity[0].flow=<FlowEntity_$$_javassist_7> 13434
...
myEntity[0].user=<UserEntity_$$_javassist_15>...
myEntity[0].stage=<StageEntity_$$_javassist_17>...
And every remote call the class names (name)_$..._javassist_(index) got the same
indexes (7,15,17) on server side (end every entity in returned collections of entities)
But when I debug on client site - after return from remote call - the indexes of
all returned entities are different (Each next increments index).
So after first call I got:
myEntity[0].id=143534
myEntity[0].flow=<FlowEntity_$$_javassist_0>...
...
myEntity[0].user=<UserEntity_$$_javassist_1>...
myEntity[0].stage=<StageEntity_$$_javassist_2>...
...
myEntity[1].id=143534
myEntity[1].flow=<FlowEntity_$$_javassist_3>
...
myEntity[1].user=<UserEntity_$$_javassist_4>...
myEntity[1].stage=<StageEntity_$$_javassist_5>...
...
After secund call:
myEntity[0].id=143534
myEntity[0].flow=<FlowEntity_$$_javassist_6>...
...
myEntity[0].user=<UserEntity_$$_javassist_7>...
myEntity[0].stage=<StageEntity_$$_javassist_8>...
...
myEntity[1].id=143534
myEntity[1].flow=<FlowEntity_$$_javassist_9>
...
myEntity[1].user=<UserEntity_$$_javassist_10>...
myEntity[1].stage=<StageEntity_$$_javassist_11>...
...
And so on... ... and permGen after 260 iterations...
I have not idea, how to deal with that... -
7. Re: PermGen leak when passing detached entities over remote
ptabor Oct 10, 2006 7:50 AM (in response to stnor)I have added it to JIRA: http://jira.jboss.com/jira/browse/EJBTHREE-736
-
8. Re: PermGen leak when passing detached entities over remote
sairamvla Aug 21, 2008 8:11 PM (in response to stnor)Sorry for asking now.
Is any body had a solution for this? I am into same situation now.