Lars Vogel has given us an introduction of Jenkins in his blog http://www.vogella.com/articles/Jenkins/article.html

However I suffered an OutOfMemory Exception after following the steps in his guide. The Jenkins’s web site (https://wiki.jenkins-ci.org/display/JENKINS/I’m+getting+OutOfMemoryError) does not tell you how to fix this in detail. It is not good for Jenkins newbee like me.

After searching the web, I found the solution is to increase the perm size from default to 512m in the catalina.bat file (I am using Tomcat Windows as the host for Jenkins) as follows:

JAVA_OPTS=”-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms512m -Xmx512m -XX:NewSize=512m -XX:MaxNewSize=512m -XX:PermSize=512m -XX:MaxPermSize=512m -XX:+DisableExplicitGC”

The JAVA_OPTS variable will be picked up by Tomcat automatically when it is started up.

After changing the perm size , the Out of memory error problem disappeared.

Advertisements