-->
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.  [ 2 posts ] 
Author Message
 Post subject: java.lang.OutOfMemoryError: PermGen space
PostPosted: Tue May 06, 2008 3:35 pm 
Newbie

Joined: Sat Dec 30, 2006 3:07 pm
Posts: 16
I am getting the following error in my webapp

Exception in thread "TP-Processor23" java.lang.OutOfMemoryError: PermGen space

I am using tomcat, struts2 and hibernate, and several postings (and my boss) blame hibernate.

Several postings said to add the following to my JAVA_OPTS "-XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled"
but that did not work for me.

This is my JAVA_OPTS variable

JAVA_OPTS="-server -Xmx2000m -Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8 -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled"


And this is the command that is actually run
/usr/java/bin/java -server -Xmx2000m -Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8 -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath :/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start



thanks

Kal



Hibernate version:
3.2.5

Mapping documents:
annotations 3.3.0

Name and version of the database you are using:
mysql 5.0.50


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 06, 2008 4:02 pm 
Red Hat Associate
Red Hat Associate

Joined: Mon Aug 16, 2004 11:14 am
Posts: 253
Location: Raleigh, NC
Just a thought, maybe you wanna up your available perm space? -XX:MaxPermSize=128m or larger. Also on a 32-bit VM you won't be able to use anything more than about 1500m or so... Use 1.6 if you can and start with the min/max/maxpermsize as your only tuning options and go from there. Just my 2 cents.

_________________
Chris Bredesen
Senior Software Maintenance Engineer, JBoss


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.