Bamboo 2.2 : Fixing OutOfMemory Errors in Bamboo
This page last changed on Mar 08, 2009 by alui.
I am getting 'Out of Memory' errors. How can I allocate more memory to Bamboo?Since the default memory setting usually is 256MB in Bamboo, you might have to adjust the settings to run a bigger Bamboo instance with sufficient memory. On Linux:
Here is an example of a minimal setting for a large system (maximum heap size is set to 768 megabytes):
RUN_CMD="java -server -Xms512m -Xmx768m -XX:MaxPermSize=256m -Djava.awt.headless=true -classpath $CLASSPATH -Dorg.mortbay.xml.XmlParser.NotValidating=true -Djetty.port=8085 com.atlassian.bamboo.server.Server 8085 ./webapp /"
On Windows: Bamboo uses a wrapper to start, either as a service or in a console.
Other NotesAllocating too much memory to your JVM Heap can also cause OutOfMemory Errors.The error java.lang.OutOfMemoryError: unable to create new native thread occurs when the operating system is unable to create new threads. This is due to the JVM Heap taking up the available RAM. Big heaps take away from the space that can be allocated for the stack of a new thread. To fix this problem, you should reduce the size of your JVM Heap and also the size of the stack per thread.
"-Xss512k"
Please refer to the following guide as a reference for JVM tuning: http://goobsoft.homeip.net/Wiki.jsp?page=JavaDebianTuning. Getting a memory dump on OOM errorsPassing in -XX:+HeapDumpOnOutOfMemoryError will make the JVM create a memory dump, when it runs out of memory. To do this: On Linux:
For example
RUN_CMD="java -server -XX:+HeapDumpOnOutOfMemoryError -Xms512m -Xmx768m -XX:MaxPermSize=256m -Djava.awt.headless=true -classpath $CLASSPATH -Dorg.mortbay.xml.XmlParser.NotValidating=true -Djetty.port=8085 com.atlassian.bamboo.server.Server 8085 ./webapp /"
On Windows: Bamboo uses a wrapper to start, either as a service or in a console.
Permanent Generation SizeIf you get the error message: java.lang.OutOfMemoryError: PermGen space this means that you have exceeded Java's fixed 64Mb block for loading class files. You will need to add the argument -XX:MaxPermSize and increase the memory.
|
![]() |
Document generated by Confluence on Mar 09, 2009 17:07 |