简体   繁体   English

生成Checkmarx报告时,带有“ OutOfMemoryError:Java堆空间”的Jenkins作业

[英]Jenkins job with “OutOfMemoryError: Java heap space” when Checkmarx report is generated

My Jenkins is running in an Ubuntu server instance. 我的Jenkins在Ubuntu服务器实例中运行。 At the completion, when a Checkmarx report is being generated, I get a Java heap space issue as shown in the screen shot: 完成时,当生成Checkmarx报告时,出现了Java heap space问题,如屏幕快照所示:

Jenkinks Java堆空间错误

Can someone help me how to increase Java heap space in Checkmarx? 有人可以帮我增加Checkmarx中的Java堆空间吗?

To read the Atlassian KB article " Scan Fails with Java Heap Space Exception " an account seems to be necessary. 要阅读Atlassian KB文章“ Java堆空间异常扫描失败 ”,似乎需要一个帐户。

Read more about what is OutOfMemoryError here . 在此处阅读有关OutOfMemoryError的更多信息。 Jenkins itself run as a Java process and if your Jenkins job is also a java process, both of them could cause out of memory Error. Jenkins本身是作为Java进程运行的,并且如果您的Jenkins作业也是Java进程,则两者都可能导致内存不足错误。

By seeing the log it looks like your job is running into the error. 通过查看日志,看来您的作业正在发生错误。 So read also about How to set a JVM option in Jenkins globally for every job? 因此,还请阅读有关如何在Jenkins中为每个作业全局设置JVM选项的信息? .

Edit: If your Jenkins process itself running into OutOfMemoryError, then refer to Increase heap size in Java on how to increase the JVM heap size for Java processes. 编辑:如果您的Jenkins进程本身运行到OutOfMemoryError中,请参阅增加Java中的堆大小以了解如何增加Java进程的JVM堆大小。

Normally -Xmx2048M is used to specify the max heap size for a java process, in my example i am setting it to 2048 MB. 通常-Xmx2048M用于指定Java进程的最大堆大小,在我的示例中,我将其设置为2048 MB。 Depending on your configuration, you specify this value in different ways. 根据您的配置,可以通过不同的方式指定此值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM