PermGen memory increases do not resolve Elastic Bamboo PermGen failures

We are running Elastic Bamboo 4.4-i386 on Amazon 2014.09. As Clover finishes building we get the following PermGen Out of Memory error:

build	31-Aug-2015 16:17:32	Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.018 sec
build	31-Aug-2015 16:17:49	org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException; nested exception is java.lang.reflect.InvocationTargetException: null
build	31-Aug-2015 16:17:49	java.lang.reflect.InvocationTargetException
build	31-Aug-2015 16:17:49		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
build	31-Aug-2015 16:17:49		at sun.reflect.NativeMethodAccessorImpl.invoke(
build	31-Aug-2015 16:17:49		at sun.reflect.DelegatingMethodAccessorImpl.invoke(
build	31-Aug-2015 16:17:49		at java.lang.reflect.Method.invoke(
build	31-Aug-2015 16:17:49		at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(
build	31-Aug-2015 16:17:49		at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(
build	31-Aug-2015 16:17:49		at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(
build	31-Aug-2015 16:17:49		at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(
build	31-Aug-2015 16:17:49		at org.apache.maven.surefire.booter.ForkedBooter.main(
build	31-Aug-2015 16:17:49	Caused by: java.lang.OutOfMemoryError: PermGen space


We are running Maven 3.0.2. In the Maven job definition I have reconfigured both MAVEN_OPTS and JAVA_OPTS to provide more PermGen memory with the following commands in the job plan:

MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=768m" JAVA_HOME="/mnt/bamboo-ebs/jdk1.7.0" M2_HOME="/opt/maven-3.0.2" M2="/opt/maven-3.0.2/bin" JAVA_OPTS="-Xmx512m -XX:MaxPermSize=768m"

We were successfully compiling and running Clover as recently as a week ago with the default PermGen value of 128 MB, about one-sixth what I have configured now. After the PermGen failures began I increased the PermGen values several times.

I checked the Elastic Bamboo instance while it was actually running. I see my settings running in the processes which eventually fail out for lack of memory. The increase PermGen values are visible in the Maven/Java processes.

What could be generating the PermGen Out of Memory error?


2 answers

0 vote

Any chance you could switch this build to JDK 8, which doesn't use permgen?

We plan to test our apps on JDK 8 later this year, but probably not for a couple of months. Unfortunately, our build/test cycle can't wait that long, so I would appreciate any help with this issue.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,824 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you