Jenkins Maven Build 137 Error

前端 未结 5 1099
猫巷女王i
猫巷女王i 2020-12-29 01:28

I have a Maven project, which builds 6 separate Maven projects in Jenkins. The problem I face is that over the time the project build fails giving the 137 error code:

<
5条回答
  •  清酒与你
    2020-12-29 02:26

    If you machine has at least 2 processors and 4GB memory, your JVM will not only grab 1GB at startup but will turn -server mode, meaning memory will be retained for performance sake (source). If you have few JVMs running at the same time (several application components, maven builds etc.) you can easily get into low memory. And one of you JVM may be killed by Linux OOM Killer because you are low on resources on the machine.

    Reduce memory footprint of your process which is directly impacted by jvm default Xmx, which most probably is far from what jvm actually need.

    Give it additional java command line options

    -Xmx256m -XX:MaxPermSize=512m
    

    or configure system variable

    MAVEN_OPTS=-Xmx256m -XX:MaxPermSize=512m
    

    MaxPermSize have no use for java 8+

提交回复
热议问题