Sonarqube scanner plugin for Jenkins is taking too much time to scan the project how to fix this?

Currently we are integrating sonarqube with jenkins using sonarqube scanner plugin for jenkins. we configured everything correctly and scan also working but the issue is that it taking too much time(around 45m) to scan the project(around 1m loc) and send those analysis results to sonarqube server. we have around 8gb ram for jenkins but the plugin is not utilising the complete memory may i know how to increase the memory utilisation of sonarqube scanner to increase the scanning speed or is there any other way to increase its speed to do scanning more faster & please let us know how to increase the workers and mermory.

Hi,

It’s not surprising to me that analyzing 1m lines takes a while. :sweat_smile:

And you can grant more memory to the scanner by setting the SONAR_SCANNER_OPTS envvar before analysis, like so

export SONAR_SCANNER_OPTS="-Xmx512m"

BTW, would you mind sharing your SonarQube version and the language(s) under analysis?

 
HTH,
Ann

Language: java
sonarqube version: sonarqube-10.0.0.68432

Hi,

Thanks for the details. Does increasing the memory allocation help? Note that I’m looking at my previous post, where I copy/pasted from the docs. You probably want to change the numbers, rather than use the ones I provided.

 
:sweat_smile:
Ann