maven - Java.lang.OutOfMemoryError: Java heap space when loading jobs on Jenkins -
i trying setup ci environment using jenkins maven project. configured , compiles, when jenkins restarted, job not shown in gui. taking @ log, get:
severe: failed loading job test java.lang.outofmemoryerror: java heap space @ java.util.arrays.copyof(arrays.java:2219) @ java.util.vector.grow(vector.java:262) @ java.util.vector.ensurecapacityhelper(vector.java:242) @ java.util.vector.addelement(vector.java:616) @ java.util.stack.push(stack.java:67) @ hudson.maven.mavenmoduleset.onload(mavenmoduleset.java:810) @ hudson.model.items.load(items.java:279) @ jenkins.model.jenkins$18.run(jenkins.java:2634) @ org.jvnet.hudson.reactor.taskgraphbuilder$taskimpl.run(taskgraphbuilder.java:169) @ org.jvnet.hudson.reactor.reactor.runtask(reactor.java:282) @ jenkins.model.jenkins$7.runtask(jenkins.java:885) @ org.jvnet.hudson.reactor.reactor$2.run(reactor.java:210) @ org.jvnet.hudson.reactor.reactor$node.run(reactor.java:117) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ java.lang.thread.run(thread.java:745)
i trying troubleshoot , noticed happens after run build (if configure , restart jenkins, shows up. if run build , restart again, disappears)
i searched problem , got many answers
1- going manage > configuration > maven project config , adding -xmx1048m -xx:maxpermsize=512m maven_opts
2- adding java_opts in manage > configuration > environment variables
3- going /etc/sysconfig/jenkins , changing jenkins_java_options
4- shuold able change jenkins_home/jenkins.xml, doesn't exist
how can solve this?
thanks
i've added line:
-xms1024m -xmx2048m -xx:newsize=256m -xx:maxnewsize=356m -xx:permsize=1024m -xx:maxpermsize=1024m
to /etc/sysconfig/jenkins file , using jps -mlv can check being applied. though, issue stills happens. happens when loading job, not running it, think maven's heap not problem here...
Comments
Post a Comment