Thứ Năm, 20 tháng 6, 2013

Fix error "java.lang.OutOfMemoryError" when build in bamboo server

Cause

The main part of the above error message is this: "java.lang.OutOfMemoryError: Java heap space". Bamboo remote agent runs out of Java heap.

Resolution

Increase the heap from REMOTE_AGENT_INSTALL/conf/wrapper.conf file:
# Initial Java Heap Size (in MB)
wrapper.java.initmemory=512
# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=1024

In case a similar error happens for Bamboo server, the heap can similarly be increased for Bamboo server from BAMBOO_INSTALL/conf/wrapper.conf file:
...
wrapper.java.additional.3=-Xms512m
wrapper.java.additional.4=-Xmx1024m
...
It is hard to guess how much memory should be allocated for Bamboo server or for remote agents. That's why it's a good idea to increase the default values a little bit in case the error happens and see how that goes.


Add Environment Variables: 

JAVA_OPTS="-Xmx256m -Xms128m"
JAVA_OPTS="-Xmx512m -Xms256m"


ANT_OPTS=”-Xmx1024m -Xms512m”
MAVEN_OPTS "-XmsMIN_HEAPm -XmxMAX_HEAPm"

Không có nhận xét nào:

Đăng nhận xét

Học lập trình web căn bản với PHP

Bài 1: Các kiến thức căn bản Part 1:  https://jimmyvan88.blogspot.com/2012/05/can-ban-lap-trinh-web-voi-php-bai-1-cac.html Part 2:  https://...