Bamboo export fails with OutOfMemoryError
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Bamboo export fails with OutOfMemoryError and Bamboo stops responding.
Environment
Not applicable.
Diagnosis
java.lang.OutOfMemoryError errors can be found at the atlassian-bamboo.log
file:
org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is java.lang.OutOfMemoryError: Java heap space
at org.springframework.orm.hibernate5.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:564)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:378)
at sun.reflect.GeneratedMethodAccessor201.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:206)
at com.sun.proxy.$Proxy109.getTransaction(Unknown Source)
at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:474)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:289)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy183.getUser(Unknown Source)
Caused by: java.lang.OutOfMemoryError: Java heap space
Cause
The heap memory settings for your Bamboo instance might be too low to handle the export procedure.
Solution
Adjust the settings below in order to run a bigger Bamboo instance with sufficient memory.
- Stop Bamboo
- Increase the heap memory in Bamboo instance by changing the configurations below:
- Linux: JVM_MINIMUM_MEMORY and JVM_MAXIMUM_MEMORY parameters
- Windows: Initial memory pool and Maximum memory pool options
- Start Bamboo back
For more information on how to change these configurations, please see this article: Configuring your system properties.