Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Hudson » java.lang.OutOfMemoryError: PermGen space
icon9.gif  java.lang.OutOfMemoryError: PermGen space [message #1001212] Wed, 16 January 2013 03:57 Go to next message
Benoit Thiebault is currently offline Benoit Thiebault
Messages: 6
Registered: January 2013
Junior Member
Hi everyone,

After one week with my new friend Hudson 3.0.0, it regularly crashes with a beautiful
java.lang.OutOfMemoryError: PermGen space
error message.

I then have to kill the java process (/etc/init.d/hudson stop doesn't respond anymore) and restart Hudson manually.

Can anyone help? I have already change the Java Xmx to 1Gb, but it does not help.

Here is my /etc/default/hudson configuration file:

# defaults for hudson continuous integration server

# pulled in from the init script; makes things easier.
NAME=hudson

# location of java
JAVA=/usr/bin/java

# arguments to pass to java
JAVA_ARGS="-Xmx1024m"

PIDFILE=/var/run/hudson/hudson.pid

# user id to be invoked as (otherwise will run as root; not wise!)
HUDSON_USER=hudson

# location of the hudson war file
HUDSON_WAR=/usr/share/hudson/hudson.war

# hudson home location
HUDSON_HOME=/home/hudson

# set this to false if you don't want Hudson to run by itself
# in this set up, you are expected to provide a servlet containr
# to host hudson.
RUN_STANDALONE=true

# log location.  this may be a syslog facility.priority
HUDSON_LOG=/var/log/hudson/$NAME.log
#HUDSON_LOG=daemon.info

# OS LIMITS SETUP
#   comment this out to observe /etc/security/limits.conf
#   this is on by default because 
#   reported that Ubuntu's PAM configuration doesn't include pam_limits.so, and as a result the # of file
#   descriptors are forced to 1024 regardless of /etc/security/limits.conf
MAXOPENFILES=8192

# port for HTTP connector (default 8080; disable with -1)
HTTP_PORT=9999

# port for AJP connector (disabled by default)
AJP_PORT=-1

# arguments to pass to hudson.
# --javahome=$JAVA_HOME
# --httpPort=$HTTP_PORT (default 8080; disable with -1)
# --httpsPort=$HTTP_PORT
# --ajp13Port=$AJP_PORT
# --argumentsRealm.passwd.$ADMIN_USER=[password]
# --argumentsRealm.$ADMIN_USER=admin
# --webroot=~/.hudson/war
HUDSON_ARGS="--webroot=/var/run/hudson/war --httpPort=$HTTP_PORT --ajp13Port=$AJP_PORT"
Re: java.lang.OutOfMemoryError: PermGen space [message #1001217 is a reply to message #1001212] Wed, 16 January 2013 04:06 Go to previous messageGo to next message
Steve Christou is currently offline Steve Christou
Messages: 125
Registered: June 2012
Location: Milwaukee, Wisconsin
Senior Member

Add the following to your JAVA_ARGS: -XX:MaxPermSize=256M

so it should look like:
JAVA_ARGS="-Xmx1024m -XX:MaxPermSize=256M"


/**
 * @author Steven Christou
 * @dev    Hudson-ci
 */
Re: java.lang.OutOfMemoryError: PermGen space [message #1001218 is a reply to message #1001217] Wed, 16 January 2013 04:08 Go to previous messageGo to next message
Benoit Thiebault is currently offline Benoit Thiebault
Messages: 6
Registered: January 2013
Junior Member
Thanks, I will try that.

Would be useful to have it set by default, or at least indicated in the installation Wiki.

Kind regards
Re: java.lang.OutOfMemoryError: PermGen space [message #1001221 is a reply to message #1001218] Wed, 16 January 2013 04:13 Go to previous messageGo to next message
Steve Christou is currently offline Steve Christou
Messages: 125
Registered: June 2012
Location: Milwaukee, Wisconsin
Senior Member

For the next release of hudson we're working on reduction of our memory footprint, so that is something we will be considering. I will see what we can put on our wiki page about this issue.

Thanks,
Steve.


/**
 * @author Steven Christou
 * @dev    Hudson-ci
 */
Re: java.lang.OutOfMemoryError: PermGen space [message #1001224 is a reply to message #1001221] Wed, 16 January 2013 04:20 Go to previous messageGo to next message
Benoit Thiebault is currently offline Benoit Thiebault
Messages: 6
Registered: January 2013
Junior Member
Thanks Steve for your help and your reactivity.

Kind regards
Re: java.lang.OutOfMemoryError: PermGen space [message #1002443 is a reply to message #1001212] Fri, 18 January 2013 10:37 Go to previous messageGo to next message
Winston Prakash is currently offline Winston Prakash
Messages: 391
Registered: August 2011
Location: Fremont, CA USA
Senior Member
Hi Benoit, is it possible to send me (winstonDOTprakashATgmailDOTcom) the full stack dump and the memory map when the OEM happens. This will help me to analyze possible area of memory foot print reduction.

Do the following

jps - This will print the PID of all Java process. Pick the PID of running Hudson
jstack <hudson process pid> > jstack.txt
jmap -heap <hudson process pid> > jmap.txt


Winston Prakash
Eclipse Hudson team
Re: java.lang.OutOfMemoryError: PermGen space [message #1006092 is a reply to message #1002443] Tue, 29 January 2013 15:26 Go to previous message
Winston Prakash is currently offline Winston Prakash
Messages: 391
Registered: August 2011
Location: Fremont, CA USA
Senior Member
We just found out, there was a memory leak in the xpath-provider plugin. This was fixed in 1.0.2 way back in Oct 2012. But some unkown reason update center seems to have 1.0.1. We upgraded it to 1.0.2 now.

Could you please verify, you have the latest version 1.0.2 of xpath-provider plugin.


Winston Prakash
Eclipse Hudson team
Previous Topic:Hudson 2.0 CVS checkout issue
Next Topic:Hudson 3.0.0 memory issue fix
Goto Forum:
  


Current Time: Thu Jul 31 09:34:51 EDT 2014

Powered by FUDForum. Page generated in 0.06458 seconds