-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: PermGen OutOfMemory after some redeploys
PostPosted: Thu Feb 04, 2010 2:39 pm 
Newbie

Joined: Thu Feb 04, 2010 2:20 pm
Posts: 1
Hello everyone,

I have a memory leak in my application which has been very hard to fix. My application classes don't leave the memory after an undeploy. I don't even need to use the application, if I just deploy and instantly undeploy, almost all of the classes remain in memory. I used jhat and jmap to track them, as described in this link http://blogs.sun.com/fkieviet/entry/how ... he_dreaded.

From what I could understand, even the simplest EAR application which uses hibernate (and its dependencies) along with Stateless Session Beans, leaks memory, and you don't even need to use the application, just deploy and undeploy it to see that all the classes remain in memory.

Are there any advices to have a perfectly clean undeploy in my server, if my application uses EJB and Hibernate? I'm running out of permgen space all the time.

My current versions are:

Glassfish 2.1.1 (latest build)
JDK 1.6 u18

Thanks.


Top
 Profile  
 
 Post subject: Re: PermGen OutOfMemory after some redeploys
PostPosted: Sat Feb 06, 2010 1:21 am 
Newbie

Joined: Tue Sep 01, 2009 2:54 am
Posts: 2
Hello
As i think u initialize your POJO CLASS object with the other object class.
And you are not free that object show you face such a problem


Top
 Profile  
 
 Post subject: Re: PermGen OutOfMemory after some redeploys
PostPosted: Tue May 11, 2010 2:00 pm 
Newbie

Joined: Tue May 11, 2010 1:47 pm
Posts: 1
bump.

I have the simplest hibernate application possible. It just creates an EntityManagerFactory and closes it immediately. It doesn't use any other libraries, except for the DB driver. There is only one @Entity with a single integer field. I've tried with both derby and h2 and the permgen always shows up after some redeploys (the jdbc driver is deployed on tomcat lib folder, outside the webapp).

I've also created a dummy webapp containing a single class weighting 2mb. After redeploying this webapp Tomcat unloads it as expected and never runs out of memory. Hence, I'm suspecting the problem might be Hibernate's.

Any advice?

I'm using hibernate-core 3.3.2.GA and hibernate-entitymanager 3.4.0.GA.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.