My project scanning time got increased suddenly

Hi team,

I have a java projects and it has few subprojects in it and scanning this project used to take nearly 8 hours but from few days it has increased to 12-13 hours. Please let me know how we can find sudden increase in the scan time? How can identify where exactly the scan time got increased?

Our Sonar server version is 7.4 and we use Sonar Maven plugin for scanning our java project.

Note: We are already in process of upgrading our sonar to LTS version.

Also please let us know the inputs for decreasing my scan timing.

Thanks,
Sunil Palugula

Hi Sunil,

Can you provide the maven debug logs when you run your sonar goal? Also, please list the exact set of commands you use to clean install, verify, sonar, etc.

Joe

Hi Joe,

Thanks for quickly jumping on my issue.

I am not able to attachment file here as it is very huge but i have verified full debug log and noticed below issue in the sub project where it took 9 hours to complete.

|build|26-Oct-2020 01:23:13|[INFO] Reactor Summary:|
|build|26-Oct-2020 01:23:13|[INFO] |
**|build|26-Oct-2020 01:23:13|[INFO] Product ......................................... SUCCESS [  09:06 h]|**
|build|26-Oct-2020 01:23:13|[INFO] Database Structure ................................. SUCCESS [  5.833 s]|
|build|26-Oct-2020 01:23:13|[INFO] Datamodel .......................................... SUCCESS [  5.333 s]|
|build|26-Oct-2020 01:23:13|[INFO] API's ....................................... SUCCESS [  1.373 s]|
|build|26-Oct-2020 01:23:13|[INFO] Outbound Documents Webservice API's ................ SUCCESS [  1.606 s]|
|build|26-Oct-2020 01:23:13|[INFO] Inbound Documents (Images) Webservice API's ........ SUCCESS [  1.572 s]|
|build|26-Oct-2020 01:23:13|[INFO] Platform .................................... SUCCESS [  1.399 s]|
|build|26-Oct-2020 01:23:13|[INFO] Core ........................................ SUCCESS [ 21.988 s]|
|build|26-Oct-2020 01:23:13|[INFO] UnitTestFramework .................................. SUCCESS [  7.220 s]|
|build|26-Oct-2020 01:23:13|[INFO] Xcore ............................................. SUCCESS [ 10.215 s]|
|build|26-Oct-2020 01:23:13|[INFO] PostreSQL Implementation ........................ SUCCESS [  7.887 s]|
|build|26-Oct-2020 01:23:13|[INFO] Benefits rpc apis .................................. SUCCESS [ 29.536 s]|
|build|26-Oct-2020 01:23:13|[INFO] Jasper Reporting Integration ................ SUCCESS [  2.763 s]|
|build|26-Oct-2020 01:23:13|[INFO] ycore .............................................. SUCCESS [ 27.614 s]|
|build|26-Oct-2020 01:23:13|[INFO] Snowbound Image Viewer .......................... SUCCESS [  2.174 s]|
|build|26-Oct-2020 01:23:13|[INFO] Snowbound Image Viewer (Production) ............. SUCCESS [  2.025 s]|
|build|26-Oct-2020 01:23:13|[INFO] Web Meta Package ................................ SUCCESS [05:29 min]|
|build|26-Oct-2020 01:23:13|[INFO] Utilities ................................... SUCCESS [  1.351 s]|
|build|26-Oct-2020 01:23:13|[INFO] Snowbound ....................................... SUCCESS [ 15.728 s]|
|build|26-Oct-2020 01:23:13|[INFO] New Relic APM integration ....................... SUCCESS [  6.328 s]|
|build|26-Oct-2020 01:23:13|[INFO] GWTCore Module .............................. SUCCESS [ 24.441 s]|
|build|26-Oct-2020 01:23:13|[INFO] VGWTGrid Module .............................. SUCCESS [  8.589 s]|
|build|26-Oct-2020 01:23:13|[INFO] gwt client ......................................... SUCCESS [  1.349 s]|
|build|26-Oct-2020 01:23:13|[INFO] Vommon GWT Components ....................... SUCCESS [02:19 min]|
|build|26-Oct-2020 01:23:13|[INFO] VGWT Frontend ................................ SUCCESS [02:03 min]|
|build|26-Oct-2020 01:23:13|[INFO] Frontend Assembly ........................... SUCCESS [  1.507 s]|
|build|26-Oct-2020 01:23:13|[INFO] Frontend  LOB  Assembly ................. SUCCESS [55:33 min]|
|build|26-Oct-2020 01:23:13|[INFO] Frontend Final ..................................... SUCCESS [ 21.076 s]|
|build|26-Oct-2020 01:23:13|[INFO] Api Core ........................................... SUCCESS [ 20.592 s]|
|build|26-Oct-2020 01:23:13|[INFO] Rest API ........................................... SUCCESS [  01:22 h]|
|build|26-Oct-2020 01:23:13|[INFO] Edge Services ...................................... SUCCESS [ 17.431 s]|
|build|26-Oct-2020 01:23:13|[INFO] vgraphql relay server ............................ SUCCESS [ 15.391 s]|
|build|26-Oct-2020 01:23:13|[INFO] Product Web Application ......................... SUCCESS [02:05 min]|

build	25-Oct-2020 17:44:58	[DEBUG] 17:44:58.845 Could not complete symbolic execution: 
build	25-Oct-2020 17:44:58	org.sonar.java.se.ExplodedGraphWalker$MaximumStepsReachedException: reached limit of 16000 steps for method validateNRATaxes#1259 in class FinancialMaintenanceServiceImpl
build	25-Oct-2020 17:44:58		at org.sonar.java.se.ExplodedGraphWalker.throwMaxSteps(ExplodedGraphWalker.java:306)
build	25-Oct-2020 17:44:58		at org.sonar.java.se.ExplodedGraphWalker.execute(ExplodedGraphWalker.java:245)
build	25-Oct-2020 17:44:58		at org.sonar.java.se.ExplodedGraphWalker.visitMethod(ExplodedGraphWalker.java:218)
build	25-Oct-2020 17:44:58		at org.sonar.java.se.SymbolicExecutionVisitor.execute(SymbolicExecutionVisitor.java:74)
build	25-Oct-2020 17:44:58		at org.sonar.java.se.xproc.BehaviorCache.get(BehaviorCache.java:146)
build	25-Oct-2020 17:44:58		at org.sonar.java.se.xproc.BehaviorCache.get(BehaviorCache.java:129)
build	25-Oct-2020 17:44:58		at org.sonar.java.se.ExplodedGraphWalker.executeMethodInvocation(ExplodedGraphWalker.java:690)
build	25-Oct-2020 17:44:58		at org.sonar.java.se.ExplodedGraphWalker.visit(ExplodedGraphWalker.java:561)
build	25-Oct-2020 17:44:58		at org.sonar.java.se.ExplodedGraphWalker.execute(ExplodedGraphWalker.java:258)
build	25-Oct-2020 17:44:58		at org.sonar.java.se.ExplodedGraphWalker.visitMethod(ExplodedGraphWalker.java:218)
build	25-Oct-2020 17:44:58		at org.sonar.java.se.SymbolicExecutionVisitor.execute(SymbolicExecutionVisitor.java:74)
build	25-Oct-2020 17:44:58		at org.sonar.java.se.SymbolicExecutionVisitor.visitNode(SymbolicExecutionVisitor.java:64)
build	25-Oct-2020 17:44:58		at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:103)
build	25-Oct-2020 17:44:58		at org.sonar.java.ast.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:128)
build	25-Oct-2020 17:44:58		at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:105)
build	25-Oct-2020 17:44:58		at org.sonar.java.ast.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:128)
build	25-Oct-2020 17:44:58		at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:105)
build	25-Oct-2020 17:44:58		at org.sonar.java.ast.visitors.SubscriptionVisitor.scanTree(SubscriptionVisitor.java:86)
build	25-Oct-2020 17:44:58		at org.sonar.java.ast.visitors.SubscriptionVisitor.scanFile(SubscriptionVisitor.java:72)
build	25-Oct-2020 17:44:58		at org.sonar.java.se.SymbolicExecutionVisitor.scanFile(SymbolicExecutionVisitor.java:54)
build	25-Oct-2020 17:44:58		at org.sonar.java.model.VisitorsBridge.runScanner(VisitorsBridge.java:149)
build	25-Oct-2020 17:44:58		at org.sonar.java.model.VisitorsBridge.visitFile(VisitorsBridge.java:137)
build	25-Oct-2020 17:44:58		at org.sonar.java.ast.JavaAstScanner.simpleScan(JavaAstScanner.java:90)
build	25-Oct-2020 17:44:58		at org.sonar.java.ast.JavaAstScanner.scan(JavaAstScanner.java:67)
build	25-Oct-2020 17:44:58		at org.sonar.java.JavaSquid.scanSources(JavaSquid.java:115)
build	25-Oct-2020 17:44:58		at org.sonar.java.JavaSquid.scan(JavaSquid.java:109)
build	25-Oct-2020 17:44:58		at org.sonar.plugins.java.JavaSquidSensor.execute(JavaSquidSensor.java:88)
build	25-Oct-2020 17:44:58		at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:45)
build	25-Oct-2020 17:44:58		at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:88)
build	25-Oct-2020 17:44:58		at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:62)
build	25-Oct-2020 17:44:58		at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:74)
build	25-Oct-2020 17:44:58		at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:164)
build	25-Oct-2020 17:44:58		at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
build	25-Oct-2020 17:44:58		at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
build	25-Oct-2020 17:44:58		at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:319)
build	25-Oct-2020 17:44:58		at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:314)
build	25-Oct-2020 17:44:58		at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:312)
build	25-Oct-2020 17:44:58		at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:288)
build	25-Oct-2020 17:44:58		at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
build	25-Oct-2020 17:44:58		at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
build	25-Oct-2020 17:44:58		at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
build	25-Oct-2020 17:44:58		at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:82)
build	25-Oct-2020 17:44:58		at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
build	25-Oct-2020 17:44:58		at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
build	25-Oct-2020 17:44:58		at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:131)
build	25-Oct-2020 17:44:58		at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
build	25-Oct-2020 17:44:58		at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:71)

Thanks,
Sunil Palugula

Hi Sunil,

Please copy and paste your logs into a gist file on github here, which you can make private. You can send me the link as a private message if that’s better also. We need to see the full logs and not a snippet of it.

Joe

Hi Joe,

The debug log is such huge that i am not able to create gist file so i have uploaded it ot google drive, can you please verify and let me know where exactly scan is taking time.

Thanks,
Sunil Palugula

Hi @Joe

Did you get chance to look at my sonar scan time issue?

Thanks,
Sunil Palugula

Hi @Palugula_Sunil,

Thank you for your patience. I’m reviewing your logs today and hope to respond to you soon. I see the log you attached is for the ~9hour run. Do you have a log of a run that took longer ~12-13 hours or a run that is much longer than 9 hours? You mentioned that its taking much longer nowadays than before.

Joe

P.S. I’ve unlisted this thread to help focus on your issue. I will message you an update soon.

Hi @Palugula_Sunil,

My apologies, I noticed you used default credentials and I got jumpy and unlisted your topic, but now I see you retracted your host URL, so that it’s ok for now. I suggest that you create a new thread and continue the troubleshooting there and tag me in it.

What do you think?

Joe