BSP-263 - java.lang.OutOfMemoryError Java heap space when deploying ~40Mb .war file.

Product: Bamboo

Environment

Operating System  
Affect Version/s  
JVM  
Database  
Application Server Tomcat 5.5.x

Error Message

Bamboo builds failing due to java.lang.OutOfMemoryError: Java heap space

Symptom

Diagnostics/Test

Execute your build from outside of bamboo, if it is successful - try replicating the exact settings for your build in Bamboo.

Root Cause

Solution

Firstly, builds in Bamboo are exactly the same as how they would be executed via command line and;

  • If you haven't done so already, can you please run your ant task outside of Bamboo, via command line?
  • When you ran your Ant task via command-line, what was the heap size for your ant task?
  • The optimal solution is to set the JAVA Heap space for your ant task - set the ANT_OPTS variable to match required java heap space required to deploy your application
    For, e.g. ANT_OPTS "-XmsMIN_HEAPm -XmxMAX_HEAPm"
    This will ensure that your ant task does not run out of heap space while deploying your application.

Labels