在jenkins中构建项目时,我收到了OutofBoundMemory的错误。 日志是这样的..
Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
at org.sonar.sslr.internal.vm.Machine.createNode(Machine.java:256)
at org.sonar.sslr.internal.vm.Instruction$RetInstruction.execute(Instruction.java:305)
at org.sonar.sslr.internal.vm.Machine.execute(Machine.java:162)
at org.sonar.sslr.internal.vm.Machine.execute(Machine.java:106)
at org.sonar.sslr.internal.vm.Machine.parse(Machine.java:84)
at org.sonar.sslr.parser.ParseRunner.parse(ParseRunner.java:45)
at com.sonar.sslr.api.typed.ActionParser.parse(ActionParser.java:102)
at com.sonar.sslr.api.typed.ActionParser.parse(ActionParser.java:91)
at org.sonar.php.PHPAnalyzer.nextFile(PHPAnalyzer.java:71)
at org.sonar.plugins.php.PHPSensor.analyseFile(PHPSensor.java:142)
at org.sonar.plugins.php.PHPSensor.analyseFiles(PHPSensor.java:124)
at org.sonar.plugins.php.PHPSensor.analyse(PHPSensor.java:115)
at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:58)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:50)
at org.sonar.batch.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:83)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:192)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:241)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:236)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:226)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
at org.sonar.batch.task.ScanTask.execute(ScanTask.java:47)
at org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:106)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:119)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
即使是构建仍在继续我猜很长时间..我正在使用sonarqube亚军 我该怎么办?
答案 0 :(得分:0)
在构建步骤的“JVM选项”输入中,您需要为进程指定更多内存(而不是默认值)。这可能是这样的:
-Xmx2g -Xms512m -XX:MaxPermSize = 512m
请注意,您应根据系统资源调整这些值。