java.lang.OutOfMemoryError: Java heap space

Jenkins JIRA | Brian Goad | 2 years ago
  1. 0

    We are running Jenkins without any heap specified (we also had 1gb specified and still ran into this issue). When trying to download an RPM generated that is just under 170MB in size using the "Get linked maven deployments" build step, the job fails with a heap error. download maven artifact: http://build/nexus/content/repositories/snapshots/com/xxx/xxx/xxx/7.0.0-SNAPSHOT/xxx-7.0.0-20140905.222907-269-xxx.rpm to /var/www/xxx/xxx/xxx/xxx-7.0.0-20140905.222907-269-xxx.rpm FATAL: Java heap space java.lang.OutOfMemoryError: Java heap space at org.jboss.netty.buffer.HeapChannelBuffer.<init>(HeapChannelBuffer.java:42) at org.jboss.netty.buffer.BigEndianHeapChannelBuffer.<init>(BigEndianHeapChannelBuffer.java:34) at org.jboss.netty.buffer.ChannelBuffers.buffer(ChannelBuffers.java:134) at org.jboss.netty.buffer.HeapChannelBufferFactory.getBuffer(HeapChannelBufferFactory.java:69) at org.jboss.netty.buffer.DynamicChannelBuffer.ensureWritableBytes(DynamicChannelBuffer.java:86) at org.jboss.netty.buffer.DynamicChannelBuffer.writeBytes(DynamicChannelBuffer.java:235) at org.jboss.netty.buffer.AbstractChannelBuffer.writeBytes(AbstractChannelBuffer.java:441) at com.ning.http.client.providers.netty.NettyResponse.getResponseBodyAsStream(NettyResponse.java:106) at hudson.plugins.mavendeploymentlinker.MavenDeploymentDownloader.downloadFile(MavenDeploymentDownloader.java:246) at hudson.plugins.mavendeploymentlinker.MavenDeploymentDownloader.perform(MavenDeploymentDownloader.java:214) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) at hudson.model.Build$RunnerImpl.build(Build.java:178) at hudson.model.Build$RunnerImpl.doRun(Build.java:139) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:473) at hudson.model.Run.run(Run.java:1410) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238) When I examine the Jenkins Monitoring Heap graph, I see that it has spiked up high. If I just leave Jenkins running, the heap continues to rise and never completely GCs. Eventually (after about a day), Jenkins gets so bogged down that it becomes unusable and needs a restart.

    Jenkins JIRA | 2 years ago | Brian Goad
    java.lang.OutOfMemoryError: Java heap space
  2. 0

    We are running Jenkins without any heap specified (we also had 1gb specified and still ran into this issue). When trying to download an RPM generated that is just under 170MB in size using the "Get linked maven deployments" build step, the job fails with a heap error. download maven artifact: http://build/nexus/content/repositories/snapshots/com/xxx/xxx/xxx/7.0.0-SNAPSHOT/xxx-7.0.0-20140905.222907-269-xxx.rpm to /var/www/xxx/xxx/xxx/xxx-7.0.0-20140905.222907-269-xxx.rpm FATAL: Java heap space java.lang.OutOfMemoryError: Java heap space at org.jboss.netty.buffer.HeapChannelBuffer.<init>(HeapChannelBuffer.java:42) at org.jboss.netty.buffer.BigEndianHeapChannelBuffer.<init>(BigEndianHeapChannelBuffer.java:34) at org.jboss.netty.buffer.ChannelBuffers.buffer(ChannelBuffers.java:134) at org.jboss.netty.buffer.HeapChannelBufferFactory.getBuffer(HeapChannelBufferFactory.java:69) at org.jboss.netty.buffer.DynamicChannelBuffer.ensureWritableBytes(DynamicChannelBuffer.java:86) at org.jboss.netty.buffer.DynamicChannelBuffer.writeBytes(DynamicChannelBuffer.java:235) at org.jboss.netty.buffer.AbstractChannelBuffer.writeBytes(AbstractChannelBuffer.java:441) at com.ning.http.client.providers.netty.NettyResponse.getResponseBodyAsStream(NettyResponse.java:106) at hudson.plugins.mavendeploymentlinker.MavenDeploymentDownloader.downloadFile(MavenDeploymentDownloader.java:246) at hudson.plugins.mavendeploymentlinker.MavenDeploymentDownloader.perform(MavenDeploymentDownloader.java:214) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) at hudson.model.Build$RunnerImpl.build(Build.java:178) at hudson.model.Build$RunnerImpl.doRun(Build.java:139) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:473) at hudson.model.Run.run(Run.java:1410) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238) When I examine the Jenkins Monitoring Heap graph, I see that it has spiked up high. If I just leave Jenkins running, the heap continues to rise and never completely GCs. Eventually (after about a day), Jenkins gets so bogged down that it becomes unusable and needs a restart.

    Jenkins JIRA | 2 years ago | Brian Goad
    java.lang.OutOfMemoryError: Java heap space
  3. 0

    getResponseBodyAsStream throws OOM

    GitHub | 5 years ago | charlesk40
    java.lang.OutOfMemoryError: Java heap space
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    OutOfMemory Exception : java heap space

    Google Groups | 6 months ago | deepak singh
    java.lang.OutOfMemoryError: Java heap space* *java.lang.OutOfMemoryError: Java heap space*
  6. 0

    OutOfMemory Exception : java heap space

    Google Groups | 6 months ago | deepak singh
    java.lang.OutOfMemoryError: Java heap space* *java.lang.OutOfMemoryError: Java heap space*

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.OutOfMemoryError

      Java heap space

      at org.jboss.netty.buffer.HeapChannelBuffer.<init>()
    2. Netty
      AbstractChannelBuffer.writeBytes
      1. org.jboss.netty.buffer.HeapChannelBuffer.<init>(HeapChannelBuffer.java:42)
      2. org.jboss.netty.buffer.BigEndianHeapChannelBuffer.<init>(BigEndianHeapChannelBuffer.java:34)
      3. org.jboss.netty.buffer.ChannelBuffers.buffer(ChannelBuffers.java:134)
      4. org.jboss.netty.buffer.HeapChannelBufferFactory.getBuffer(HeapChannelBufferFactory.java:69)
      5. org.jboss.netty.buffer.DynamicChannelBuffer.ensureWritableBytes(DynamicChannelBuffer.java:86)
      6. org.jboss.netty.buffer.DynamicChannelBuffer.writeBytes(DynamicChannelBuffer.java:235)
      7. org.jboss.netty.buffer.AbstractChannelBuffer.writeBytes(AbstractChannelBuffer.java:441)
      7 frames
    3. Asynchronous Http Client
      NettyResponse.getResponseBodyAsStream
      1. com.ning.http.client.providers.netty.NettyResponse.getResponseBodyAsStream(NettyResponse.java:106)
      1 frame
    4. hudson.plugins.mavendeploymentlinker
      MavenDeploymentDownloader.perform
      1. hudson.plugins.mavendeploymentlinker.MavenDeploymentDownloader.downloadFile(MavenDeploymentDownloader.java:246)
      2. hudson.plugins.mavendeploymentlinker.MavenDeploymentDownloader.perform(MavenDeploymentDownloader.java:214)
      2 frames
    5. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      2. hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703)
      3. hudson.model.Build$RunnerImpl.build(Build.java:178)
      4. hudson.model.Build$RunnerImpl.doRun(Build.java:139)
      5. hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:473)
      6. hudson.model.Run.run(Run.java:1410)
      7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      8. hudson.model.ResourceController.execute(ResourceController.java:88)
      9. hudson.model.Executor.run(Executor.java:238)
      9 frames