• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-plugin
    • Ubuntu 11.10
      Java 1.6

      Was running 1.506 jenkins, and then rolled forward to 1.527. (also updated plugins, which I won't list here unless we think there is a specific one that might be causing the problem).

      Didn't change any jobs, just kept running as-is.

      Suddenly, after the server has been up for more than a couple days I start getting these messages:
      FATAL: PermGen space
      java.lang.OutOfMemoryError: PermGen space
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
      at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1128)
      at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:696)
      at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1299)
      at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1355)
      at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1315)
      at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1068)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
      at org.apache.http.impl.conn.PoolingClientConnectionManager.leaseConnection(PoolingClientConnectionManager.java:222)
      at org.apache.http.impl.conn.PoolingClientConnectionManager$1.getConnection(PoolingClientConnectionManager.java:199)
      at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:456)
      at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
      at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
      at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:746)
      at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:886)
      at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
      at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
      at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
      at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:660)
      at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:679)

      ------------------
      Something has changed recently that is slowly using up more and more memory, because this wasn't an issue before. I've even tried increasing the amount of permgen space available and that has had no measurable effect.

          [JENKINS-19335] Sudden influx of permgen space issues

          A K created issue -

          A K added a comment -

          https://issues.jenkins-ci.org/browse/JENKINS-16536

          Was closed as 'normal/expected'...but the truth of the matter is that Jenkins was running fine for months with no reset before the patch...and now I have to reset it every few days.

          A K added a comment - https://issues.jenkins-ci.org/browse/JENKINS-16536 Was closed as 'normal/expected'...but the truth of the matter is that Jenkins was running fine for months with no reset before the patch...and now I have to reset it every few days.

          A K added a comment -

          If the answer is just increase the permgen memory more, and cross your fingers. so be it. But I figured I'd report this again/see if there was some other cause.

          A K added a comment - If the answer is just increase the permgen memory more, and cross your fingers. so be it. But I figured I'd report this again/see if there was some other cause.

          We're also seeing this issue and just updated to 1.531 this morning along with a handful of plugin updates. I added memory statements to the Global MAVEN_OPTS more than 2 weeks ago; which helped.

          I've been playing with various values: current values -Xmx1536M -XX:MaxPermSize=1536M

          We hadn't seen any memory issues in more than 2 weeks after I first added these statements, which are even higher now. We're running on OS X 10.8.5

          The memory error returned yesterday evening and again this morning.

          Matthew Stevens added a comment - We're also seeing this issue and just updated to 1.531 this morning along with a handful of plugin updates. I added memory statements to the Global MAVEN_OPTS more than 2 weeks ago; which helped. I've been playing with various values: current values -Xmx1536M -XX:MaxPermSize=1536M We hadn't seen any memory issues in more than 2 weeks after I first added these statements, which are even higher now. We're running on OS X 10.8.5 The memory error returned yesterday evening and again this morning.

          Waldek M added a comment -

          Same here. 2 months ago, 192m of PermGen was fine.
          Now, to let Jenkins survive more than a day, I had to increase it to 1500m.

          Waldek M added a comment - Same here. 2 months ago, 192m of PermGen was fine. Now, to let Jenkins survive more than a day, I had to increase it to 1500m.

          Waldek M added a comment -

          Weird. It seems that whatever I set, it gets ignored.
          Can someone please tell me what I'm doing wrong?

          /home/myuser/jdk1.6.0_24/bin/java -Dcom.sun.akuma.Daemon=daemonized -jar /home/myuser/hudson/jenkins.war --daemon --config=/home/myuser/hudson/hudson_1/etc/winstone.properties --logfile=/home/myuser/hudson/hudson_1/log/20130930104251-winstone.log -XX:MaxPermSize=512m -XX:PermSize=256m

          And the heap's MaxPermSize is still fixed at 82MB:

          jmap -heap 907
          Attaching to process ID 907, please wait...
          Debugger attached successfully.
          Server compiler detected.
          JVM version is 19.1-b02

          using thread-local object allocation.
          Parallel GC with 18 thread(s)

          Heap Configuration:
          MinHeapFreeRatio = 40
          MaxHeapFreeRatio = 70
          MaxHeapSize = 12660506624 (12074.0MB)
          NewSize = 1310720 (1.25MB)
          MaxNewSize = 17592186044415 MB
          OldSize = 5439488 (5.1875MB)
          NewRatio = 2
          SurvivorRatio = 8
          PermSize = 21757952 (20.75MB)

          Waldek M added a comment - Weird. It seems that whatever I set, it gets ignored. Can someone please tell me what I'm doing wrong? /home/myuser/jdk1.6.0_24/bin/java -Dcom.sun.akuma.Daemon=daemonized -jar /home/myuser/hudson/jenkins.war --daemon --config=/home/myuser/hudson/hudson_1/etc/winstone.properties --logfile=/home/myuser/hudson/hudson_1/log/20130930104251-winstone.log -XX:MaxPermSize=512m -XX:PermSize=256m And the heap's MaxPermSize is still fixed at 82MB: jmap -heap 907 Attaching to process ID 907, please wait... Debugger attached successfully. Server compiler detected. JVM version is 19.1-b02 using thread-local object allocation. Parallel GC with 18 thread(s) Heap Configuration: MinHeapFreeRatio = 40 MaxHeapFreeRatio = 70 MaxHeapSize = 12660506624 (12074.0MB) NewSize = 1310720 (1.25MB) MaxNewSize = 17592186044415 MB OldSize = 5439488 (5.1875MB) NewRatio = 2 SurvivorRatio = 8 PermSize = 21757952 (20.75MB)

          A K added a comment - http://stackoverflow.com/questions/14762162/how-do-i-give-jenkins-more-heap-space-when-its-running-as-a-daemon-on-ubuntu#comment27039638_14762164

          Waldek M added a comment -

          Thanks, yet it's not that (I think); I'm not starting the service - I'm starting the jenkins war directly with java, setting parameters as above. Using JAVA_OPTS has no effect.
          Or did you have something specific in mind?

          Waldek M added a comment - Thanks, yet it's not that (I think); I'm not starting the service - I'm starting the jenkins war directly with java, setting parameters as above. Using JAVA_OPTS has no effect. Or did you have something specific in mind?

          Waldek M added a comment - - edited

          Got it
          a) I moved the -XX parameters to front, before the -jar
          b) used a newer Java. 1.6.0_24 didn't recognize the -XX:MaxPermSize.

          Waldek M added a comment - - edited Got it a) I moved the -XX parameters to front, before the -jar b) used a newer Java. 1.6.0_24 didn't recognize the -XX:MaxPermSize.

          This also worked on a Mac Server installation. Let's get that added to the doco.

          Our script to start Jenkins now.

          #!/bin/bash
          export JENKINS_HOME=/jenkins
          java -DJENKINS_HOME=/jenkins/ -Xmx1536M -XX:MaxPermSize=1536M -jar /jenkins/jenkins.war

          Matthew Stevens added a comment - This also worked on a Mac Server installation. Let's get that added to the doco. Our script to start Jenkins now. #!/bin/bash export JENKINS_HOME=/jenkins java -DJENKINS_HOME=/jenkins/ -Xmx1536M -XX:MaxPermSize=1536M -jar /jenkins/jenkins.war

            Unassigned Unassigned
            casualt A K
            Votes:
            5 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: