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 votes

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
Community showcase
Posted Tuesday in Statuspage

Introducing Statuspage Getting Started guides! First up: What is Statuspage?

Over the next several weeks we'll be sharing some of our Getting Started guides here in the community. Throughout this series of posts, we'd love to hear from customers and non-customers ab...

175 views 4 1
Join discussion

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