Closed akuryan closed 8 years ago
Sorry for this - missed that I can setup JVM parameters in runner itself.
Solution was to set "-Xmx1024m" in "JVM command line parameters" field of SonarQube runner in Advanced options
@akuryan Glad you've solved your issue
what to do if we get same error at sonarqube server side, after getting execution "Success" at sonar runner side
@Heena-Patel You should increase Xmx for the server in conf/sonar.properties file (find sonar.web.javaOpts)
Trying to analyzing C# project with 3108 files results in OOM on Teamcity side. I was not able to find out how to increase memory for plugin :(
Here is excerpt from debug log:
17:48:42.629 DEBUG - Release semaphore on project : org.sonar.api.resources.Project@381b6e[id=2454,key=CSharpProjects_MsDeployDelivery_Lecbyqa3_DorelCarFittingList,qualifier=TRK], with key batch-CSharpProjects_MsDeployDelivery_Lecbyqa3_DorelCarFittingList [17:48:42]Exception in thread "LOG_FLUSHER" java.lang.OutOfMemoryError: Java heap space [17:48:42] at java.util.TreeMap$Values.iterator(Unknown Source) [17:48:42] at com.persistit.AlertMonitor.poll(AlertMonitor.java:675) [17:48:42] at com.persistit.Persistit.pollAlertMonitors(Persistit.java:2287) [17:48:42] at com.persistit.Persistit$LogFlusher.run(Persistit.java:192) [17:48:42]INFO: ------------------------------------------------------------------------ [17:48:42]INFO: EXECUTION FAILURE [17:48:42]INFO: ------------------------------------------------------------------------ [17:48:42]Total time: 7:00.017s [17:48:42]Final Memory: 12M/247M [17:48:42]ERROR: Error during Sonar runner execution [17:48:42]INFO: ------------------------------------------------------------------------ [17:48:42]org.sonar.runner.impl.RunnerException: Unable to execute Sonar [17:48:42] at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91) [17:48:42] at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75) [17:48:42] at java.security.AccessController.doPrivileged(Native Method) [17:48:42] at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69) [17:48:42] at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50) [17:48:42] at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102) [17:48:42] at org.sonar.runner.api.Runner.execute(Runner.java:100) [17:48:42] at org.sonar.runner.Main.executeTask(Main.java:70) [17:48:42] at org.sonar.runner.Main.execute(Main.java:59) [17:48:42] at org.sonar.runner.Main.main(Main.java:53) [17:48:42]Caused by: java.lang.OutOfMemoryError: Java heap space [17:48:42] at org.sonar.plugins.csharp.CSharpCPDMapping$1.tokenize(CSharpCPDMapping.java:169) [17:48:42] at org.sonar.duplications.internal.pmd.TokenizerBridge.chunk(TokenizerBridge.java:60) [17:48:42] at org.sonar.duplications.internal.pmd.TokenizerBridge.chunk(TokenizerBridge.java:52) [17:48:42] at org.sonar.batch.cpd.DefaultCpdEngine.populateIndex(DefaultCpdEngine.java:148) [17:48:42] at org.sonar.batch.cpd.DefaultCpdEngine.analyse(DefaultCpdEngine.java:109) [17:48:42] at org.sonar.batch.cpd.CpdSensor.execute(CpdSensor.java:96) [17:48:42] at org.sonar.batch.scan.SensorWrapper.analyse(SensorWrapper.java:59) [17:48:42] at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:59) [17:48:42] at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:51) [17:48:42] at org.sonar.batch.phases.DatabaseModePhaseExecutor.execute(DatabaseModePhaseExecutor.java:120) [17:48:42] at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:264) [17:48:42] at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [17:48:42] at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [17:48:42] at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:235) [17:48:42] at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:230) [17:48:42] at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:220) [17:48:42] at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [17:48:42] at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [17:48:42] at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:57) [17:48:42] at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45) [17:48:42] at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:135) [17:48:42] at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [17:48:42] at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [17:48:42] at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:158) [17:48:42] at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95) [17:48:42] at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67) [17:48:42] at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48) [17:48:42] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [17:48:42] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [17:48:42] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [17:48:42] at java.lang.reflect.Method.invoke(Unknown Source) [17:48:42] at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87) [17:48:42]Process exited with code 1