I am using Linux, and I already configured my builder user ".bashrc" script 
with 
JAVA_OPTS="$JAVA_OPTS -Xmx1024 -XX:MaxPermSize=512m"

Do I need to put this JAVA_OPTS in my Jenkins launch script rather than users 
.bashrc script



-----Original Message-----
From: Didier Durand <durand.did...@gmail.com>
To: Jenkins Users <jenkinsci-users@googlegroups.com>
Sent: Thu, Mar 1, 2012 2:38 pm
Subject: Re: Facing problem of “java.lang.OutOfMemoryError: PermGen space” in 
Jenkins


This is for maven: so it will apply to your job after it starts
uilding (in a separate JVM launched by Jenkins for each Job)
In your case, it is the "master" JVM used by Jenkins core functions
hat has the issue: it's definitely the Jenkins launch script that has
o be updated.
Can you tell us about your environnment: os, etc. so that we can
elp ?
regards
didier
On Mar 1, 8:55 am, jhoomshar...@netscape.net wrote:
 I have this entry in my lunch script:

 export MAVEN_OPTS="-Djava.awt.headless=true -XX:-UseGCOverheadLimit -Xms1280m 
Xmx1280m -XX:NewSize=128m -XX:MaxPermSize=512m"







 -----Original Message-----
 From: Didier Durand <durand.did...@gmail.com>
 To: Jenkins Users <jenkinsci-users@googlegroups.com>
 Sent: Thu, Mar 1, 2012 12:45 pm
 Subject: Re: Facing problem of “java.lang.OutOfMemoryError: PermGen space” in 
enkins

 Hi,
 Did you try to increase the PermGen space in the launch shell script
 f jenkins.
 If you are like me on Ubuntu it's in /etc/default in file jenkins :
 ine JAVA_ARGS.
 regards
 didier
 On Mar 1, 8:09 am, jhoomshar...@netscape.net wrote:
  Hi All,
  I am facing problem of “java.lang.OutOfMemoryError: PermGen space” in Jenkins
 1.451, this out of memory issue comes when Jenkins try to connect to Slave or 

 uild starts on Slave, following is the error message:
  
//----------------------------------------------------------------------------------------------------------------
  Exception in thread "RequestHandlerThread[#0]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#5]" java.lang.OutOfMemoryError:
 ermGen space
  Feb 29, 2012 7:46:39 AM hudson.remoting.Channel$ReaderThread run
  SEVERE: Unexpected error in channel vw-aus-atm-bl01
  java.lang.OutOfMemoryError: PermGen space
          at sun.misc.Unsafe.defineClass(Native Method)
          at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:45)
          at 
sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:381)
          at java.security.AccessController.doPrivileged(Native Method)
          at 
sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:377)
          at 
sun.reflect.MethodAccessorGenerator.generateSerializationConstructor(MethodAccessorGenerator.java:95)
          at 
sun.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:313)
          at 
java.io.ObjectStreamClass.getSerializableConstructor(ObjectStreamClass.java:1327)
          at java.io.ObjectStreamClass.access$1500(ObjectStreamClass.java:52)
          at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:437)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:413)
          at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:310)
          at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:547)
          at 
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1582)
          at 
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
          at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
          at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
          at 
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
          at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
          at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
          at 
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
          at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
          at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
          at hudson.remoting.Channel$ReaderThread.run(Channel.java:1127)
  Exception in thread "Channel reader thread: vl-aus-atm-bl01"
 ava.lang.OutOfMemoryError: PermGen space
  Exception in thread "Ping thread for channel 
hudson.remoting.Channel@87ca1a9:vw-aus-atm-bl01"
 ava.lang.OutOfMemoryError: PermGen space
  Exception in thread "Ping thread for channel 
hudson.remoting.Channel@453130df:vl-aus-atm-bl01"
 ava.lang.OutOfMemoryError: PermGen space
  Feb 29, 2012 7:48:18 AM winstone.Logger logInternal
  WARNING: Untrapped Error in Servlet
  java.lang.OutOfMemoryError: PermGen space
  Exception in thread "Channel reader thread: vw-aus-atm-bl01"
 ava.lang.OutOfMemoryError: PermGen space
  Exception in thread "RequestHandlerThread[#3]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#1]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#4]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#6]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#2]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "Jenkins cron thread" java.lang.OutOfMemoryError: PermGen
 pace
  Exception in thread "RequestHandlerThread[#7]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#8]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#14]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#13]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#9]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#11]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#10]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#12]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#15]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#17]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#16]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#18]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#19]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#21]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#22]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#20]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#23]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#24]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#25]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#26]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#28]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#29]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#27]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "SocketListener(engrhes50x64-rba.local.)"
 ava.lang.OutOfMemoryError: PermGen space
  Exception in thread "JmDNS(engrhes50x64-rba.local.).Timer"
 ava.lang.OutOfMemoryError: PermGen space
  Exception in thread "RequestHandlerThread[#30]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#31]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#32]" java.lang.OutOfMemoryError:
 ermGen space
  Exception in thread "RequestHandlerThread[#33]" java.lang.OutOfMemoryError:
 ermGen space
  
//----------------------------------------------------------------------------------------------------------------
  Because of out of memory issue every day I need to restart Jenkins server to
 ake it up, this has became really a pain in neck, anyone has any idea on how I
 an go away with this issue any configuration  I need to change under my Slave
 /c
  Slave Lunch Method is “Launch Slave via execution of command on Master”.

  Any help in this regard is highly appreciated.

  Thanks,
  Jhoom

Reply via email to