SonarQube 10.2.1 performance

Hi, I updated SonarQube from version 9.9 to 10.2.1 and I am unable to analyse the project after upgrade without timeout in CI.

The project has the following configuration:
Gradle 8.1
AGP (Android gradle plugin) 8.1.2
Sonarqube plugin 4.4.1.33773
Java 17

I tested both versions locally (docker image)

Analysis with SonarQube 9.9 docker image took 16 min
Analysis with SonarQube 10.2.1 docker image took 4h 20 min

There was no change in the project configuration. I only changed the endpoint.

Is there any significant difference between version 9.9 and 10.2.1? Is there any way to debug why it is taking too long?

1 Like

Hi,

What version of the SonarScanner for Gradle are you using?

Also, what edition of SonarQube are you using? You can find it in the footer if you’re not sure.

 
Thx,
Ann

SonarScanner 4.4.1.33773. (I also tried earlier versions)

SonarQube Community Edition 10.2.1 (build 78527) - local testing
SonarQube Data Center Edition 10.2.1 (build 78527) - CI

1 Like

Hi,

Thanks for those details.

Since you’re on the latest scanner version, the next step is to provide your analysis log.

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them. (Since it’s Gradle, make sure you turn on --debug logging.)

 
Thx,
Ann

I am unable to share full analysis log. Is there anything I should look at?

I noticed that this part is repeating between each module and it takes 1-2 min. Analysed project has 100+ modules.


2023-11-03T13:35:44.455+0000 [INFO] [org.sonarqube.gradle.SonarTask] Sensor Kotlin Sensor [kotlin] (done) | time=517ms
2023-11-03T13:35:44.455+0000 [INFO] [org.sonarqube.gradle.SonarTask] Sensor Gradle Sensor [kotlin]
2023-11-03T13:35:44.455+0000 [DEBUG] [org.sonarqube.gradle.SonarTask] Connecting from tooling API consumer version 7.5.1
2023-11-03T13:35:46.219+0000 [LIFECYCLE] [org.gradle.cache.internal.DefaultFileLockManager] 
2023-11-03T13:35:46.219+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2023-11-03T13:35:46.219+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2023-11-03T13:35:46.220+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2023-11-03T13:35:46.221+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2023-11-03T13:35:46.221+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2023-11-03T13:35:46.221+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2023-11-03T13:35:46.462+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [345s 220ms] HttpClientImpl(1) next timeout: 0
2023-11-03T13:35:46.462+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [345s 221ms] HttpClientImpl(1) next expired: 0
2023-11-03T13:35:46.462+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [345s 221ms] HttpClientImpl(1) Next deadline is 3000
2023-11-03T13:35:49.464+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [348s 223ms] HttpClientImpl(1) next timeout: 0
2023-11-03T13:35:49.465+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [348s 224ms] HttpClientImpl(1) next expired: 0
2023-11-03T13:35:49.465+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [348s 224ms] HttpClientImpl(1) Next deadline is 3000
2023-11-03T13:35:52.470+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [351s 228ms] HttpClientImpl(1) next timeout: 0
2023-11-03T13:35:52.470+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [351s 230ms] HttpClientImpl(1) next expired: 0
2023-11-03T13:35:52.470+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [351s 230ms] HttpClientImpl(1) Next deadline is 3000
2023-11-03T13:35:55.018+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker Thread 2: acquired lock on worker lease
2023-11-03T13:35:55.019+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker Thread 2: released lock on worker lease
2023-11-03T13:35:55.019+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 11: acquired lock on worker lease
2023-11-03T13:35:55.020+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 11: released lock on worker lease
2023-11-03T13:35:55.020+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 2: acquired lock on worker lease
2023-11-03T13:35:55.020+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 2: released lock on worker lease
2023-11-03T13:35:55.020+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 10: acquired lock on worker lease
2023-11-03T13:35:55.020+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 10: released lock on worker lease
2023-11-03T13:35:55.020+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 5: acquired lock on worker lease
2023-11-03T13:35:55.020+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 5: released lock on worker lease
2023-11-03T13:35:55.020+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 3: acquired lock on worker lease
2023-11-03T13:35:55.020+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 3: released lock on worker lease
2023-11-03T13:35:55.020+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 9: acquired lock on worker lease
2023-11-03T13:35:55.020+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 9: released lock on worker lease
2023-11-03T13:35:55.021+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 6: acquired lock on worker lease
2023-11-03T13:35:55.021+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 6: released lock on worker lease
2023-11-03T13:35:55.021+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 7: acquired lock on worker lease
2023-11-03T13:35:55.021+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 7: released lock on worker lease
2023-11-03T13:35:55.021+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 4: acquired lock on worker lease
2023-11-03T13:35:55.021+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 4: released lock on worker lease
2023-11-03T13:35:55.021+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] included builds Thread 2: acquired lock on worker lease
2023-11-03T13:35:55.021+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] included builds Thread 2: released lock on worker lease
2023-11-03T13:35:55.021+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker: acquired lock on worker lease
2023-11-03T13:35:55.021+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker: released lock on worker lease
2023-11-03T13:35:55.472+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [354s 230ms] HttpClientImpl(1) next timeout: 0
2023-11-03T13:35:55.472+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [354s 231ms] HttpClientImpl(1) next expired: 0
2023-11-03T13:35:55.472+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [354s 231ms] HttpClientImpl(1) Next deadline is 3000
2023-11-03T13:35:56.217+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2023-11-03T13:35:56.218+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2023-11-03T13:35:56.219+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2023-11-03T13:35:56.220+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2023-11-03T13:35:56.220+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2023-11-03T13:35:56.220+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2023-11-03T13:35:58.473+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [357s 232ms] HttpClientImpl(1) next timeout: 0
2023-11-03T13:35:58.473+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [357s 233ms] HttpClientImpl(1) next expired: 0
2023-11-03T13:35:58.474+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [357s 233ms] HttpClientImpl(1) Next deadline is 3000
2023-11-03T13:36:01.476+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [360s 235ms] HttpClientImpl(1) next timeout: 0
2023-11-03T13:36:01.476+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [360s 235ms] HttpClientImpl(1) next expired: 0
2023-11-03T13:36:01.476+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [360s 235ms] HttpClientImpl(1) Next deadline is 3000
2023-11-03T13:36:04.477+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [363s 236ms] HttpClientImpl(1) next timeout: 0
2023-11-03T13:36:04.477+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [363s 237ms] HttpClientImpl(1) next expired: 0
2023-11-03T13:36:04.477+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [363s 237ms] HttpClientImpl(1) Next deadline is 3000
2023-11-03T13:36:06.219+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2023-11-03T13:36:06.219+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2023-11-03T13:36:06.219+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2023-11-03T13:36:06.219+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2023-11-03T13:36:06.220+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2023-11-03T13:36:06.220+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2023-11-03T13:36:07.479+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [366s 238ms] HttpClientImpl(1) next timeout: 0
2023-11-03T13:36:07.479+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [366s 239ms] HttpClientImpl(1) next expired: 0
2023-11-03T13:36:07.479+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [366s 239ms] HttpClientImpl(1) Next deadline is 3000
2023-11-03T13:36:10.482+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [369s 241ms] HttpClientImpl(1) next timeout: 0
2023-11-03T13:36:10.482+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [369s 241ms] HttpClientImpl(1) next expired: 0
2023-11-03T13:36:10.482+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [369s 241ms] HttpClientImpl(1) Next deadline is 3000
2023-11-03T13:36:13.485+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [372s 244ms] HttpClientImpl(1) next timeout: 0
2023-11-03T13:36:13.486+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [372s 245ms] HttpClientImpl(1) next expired: 0
2023-11-03T13:36:13.486+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [372s 245ms] HttpClientImpl(1) Next deadline is 3000
2023-11-03T13:36:16.219+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2023-11-03T13:36:16.219+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2023-11-03T13:36:16.220+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2023-11-03T13:36:16.220+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2023-11-03T13:36:16.220+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2023-11-03T13:36:16.221+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2023-11-03T13:36:16.488+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [375s 247ms] HttpClientImpl(1) next timeout: 0
2023-11-03T13:36:16.488+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [375s 247ms] HttpClientImpl(1) next expired: 0
2023-11-03T13:36:16.488+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [375s 247ms] HttpClientImpl(1) Next deadline is 3000
2023-11-03T13:36:19.489+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [378s 248ms] HttpClientImpl(1) next timeout: 0
2023-11-03T13:36:19.489+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [378s 249ms] HttpClientImpl(1) next expired: 0
2023-11-03T13:36:19.489+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [378s 249ms] HttpClientImpl(1) Next deadline is 3000
2023-11-03T13:36:22.491+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [381s 250ms] HttpClientImpl(1) next timeout: 0
2023-11-03T13:36:22.491+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [381s 250ms] HttpClientImpl(1) next expired: 0
2023-11-03T13:36:22.491+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [381s 250ms] HttpClientImpl(1) Next deadline is 3000
2023-11-03T13:36:25.029+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker Thread 2: acquired lock on worker lease
2023-11-03T13:36:25.030+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker Thread 2: released lock on worker lease
2023-11-03T13:36:25.030+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 11: acquired lock on worker lease
2023-11-03T13:36:25.030+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 11: released lock on worker lease
2023-11-03T13:36:25.030+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker: acquired lock on worker lease
2023-11-03T13:36:25.030+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker: released lock on worker lease
2023-11-03T13:36:25.030+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] included builds Thread 2: acquired lock on worker lease
2023-11-03T13:36:25.030+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] included builds Thread 2: released lock on worker lease
2023-11-03T13:36:25.030+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 4: acquired lock on worker lease
2023-11-03T13:36:25.031+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 4: released lock on worker lease
2023-11-03T13:36:25.031+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 7: acquired lock on worker lease
2023-11-03T13:36:25.031+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 7: released lock on worker lease
2023-11-03T13:36:25.031+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 6: acquired lock on worker lease
2023-11-03T13:36:25.031+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 6: released lock on worker lease
2023-11-03T13:36:25.031+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 9: acquired lock on worker lease
2023-11-03T13:36:25.031+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 9: released lock on worker lease
2023-11-03T13:36:25.031+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 3: acquired lock on worker lease
2023-11-03T13:36:25.031+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 3: released lock on worker lease
2023-11-03T13:36:25.031+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 5: acquired lock on worker lease
2023-11-03T13:36:25.031+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 5: released lock on worker lease
2023-11-03T13:36:25.031+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 10: acquired lock on worker lease
2023-11-03T13:36:25.031+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 10: released lock on worker lease
2023-11-03T13:36:25.032+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 2: acquired lock on worker lease
2023-11-03T13:36:25.032+0000 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 2: released lock on worker lease
2023-11-03T13:36:25.492+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [384s 251ms] HttpClientImpl(1) next timeout: 0
2023-11-03T13:36:25.492+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [384s 251ms] HttpClientImpl(1) next expired: 0
2023-11-03T13:36:25.492+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [384s 251ms] HttpClientImpl(1) Next deadline is 3000
2023-11-03T13:36:26.213+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2023-11-03T13:36:26.214+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2023-11-03T13:36:26.214+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2023-11-03T13:36:26.216+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2023-11-03T13:36:26.216+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2023-11-03T13:36:26.216+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2023-11-03T13:36:28.493+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [387s 252ms] HttpClientImpl(1) next timeout: 0
2023-11-03T13:36:28.493+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [387s 253ms] HttpClientImpl(1) next expired: 0
2023-11-03T13:36:28.493+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [387s 253ms] HttpClientImpl(1) Next deadline is 3000
2023-11-03T13:36:31.496+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [390s 255ms] HttpClientImpl(1) next timeout: 0
2023-11-03T13:36:31.496+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [390s 255ms] HttpClientImpl(1) next expired: 0
2023-11-03T13:36:31.496+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [390s 255ms] HttpClientImpl(1) Next deadline is 3000
2023-11-03T13:36:34.498+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [393s 257ms] HttpClientImpl(1) next timeout: 0
2023-11-03T13:36:34.498+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [393s 257ms] HttpClientImpl(1) next expired: 0
2023-11-03T13:36:34.498+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [393s 258ms] HttpClientImpl(1) Next deadline is 3000
2023-11-03T13:36:36.216+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2023-11-03T13:36:36.217+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2023-11-03T13:36:36.217+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2023-11-03T13:36:36.218+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2023-11-03T13:36:36.218+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2023-11-03T13:36:36.218+0000 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2023-11-03T13:36:37.500+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [396s 259ms] HttpClientImpl(1) next timeout: 0
2023-11-03T13:36:37.500+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [396s 259ms] HttpClientImpl(1) next expired: 0
2023-11-03T13:36:37.500+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [396s 259ms] HttpClientImpl(1) Next deadline is 3000
2023-11-03T13:36:40.502+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [399s 261ms] HttpClientImpl(1) next timeout: 0
2023-11-03T13:36:40.502+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [399s 262ms] HttpClientImpl(1) next expired: 0
2023-11-03T13:36:40.502+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [399s 262ms] HttpClientImpl(1) Next deadline is 3000
2023-11-03T13:36:43.505+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [402s 264ms] HttpClientImpl(1) next timeout: 0
2023-11-03T13:36:43.506+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [402s 265ms] HttpClientImpl(1) next expired: 0
2023-11-03T13:36:43.506+0000 [DEBUG] [jdk.internal.httpclient.debug] [HttpClient-1-SelectorManager] [402s 265ms] HttpClientImpl(1) Next deadline is 3000
2023-11-03T13:36:44.442+0000 [INFO] [org.sonarqube.gradle.SonarTask] 1 source file to be analyzed
2023-11-03T13:35:45.291+0000 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] 
2023-11-03T13:35:45.291+0000 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] > Task :sonar
2023-11-03T13:36:44.420+0000 [INFO] [org.sonarqube.gradle.SonarTask] Sensor Gradle Sensor [kotlin] (done) | time=59964ms
2023-11-03T13:36:44.422+0000 [INFO] [org.sonarqube.gradle.SonarTask] Sensor KotlinSurefireSensor [kotlin]


Thanks

1 Like

Hi,

Okay, let’s back up. 100+ modules? I think I might have spotted the performance problem. :sweat_smile:

Jokes aside, it might be a mistake for us to recommend --debug Gradle logging. Could you try it with --info and see if that gives a manageable volume? Feel free to redact as necessary.

 
Ann

The amount of modules is not an issue. I tried to compare logs when I ran ./gradlew sonar with version 9.9 and 10.2.1 and only difference is timeout that I posted in previous comment.

Full analysis (±240 modules)
Sonarqube 9.9 → ./gradlew sonar → 18 min
Sonarqube 10.2.1 → ./gradlew sonar → 4h 20 min (there is an timeout between each module)

Single module:
Sonarqube 9.9 → ./gradlew sonar → 1m 6s
Sonarqube 10.2.1 → ./gradlew sonar → 2min 40s

2 Likes

Hi,

Thanks for the timings. Could you try providing a --info log?

 
Thx,
Ann

I run ./gradlew sonar --info only for 2 module.

sonarqube-9.9.txt (11.8 KB)
sonarqube-10.2.1.txt (12.1 KB)

Hi,

In looking at these log files I see a few things:

  • JaCoCo takes longer in 10.2
  • Gradle analysis is new
  • Kotlin analysis takes longer
  • A number of other sensors take incrementally longer

But the big thing here is that in 9.9 the SCM sensor reports only 12 files to be analyzed, but 10.2.1 reports 47. In other words, more files are being analyzed in 10.2.

IMO, it would be worth examining the difference in what files are included and what’s raised on them to see if it’s worth it to you. If not, the ‘extra’ files could easily be excluded. If it is worth it, then maybe break up analysis into chunks?

 
Ann

Hi,

Is there any way to disable “Sensor Gradle Sensor”?
I tried to exclude **/*.kts, **/*.gradle but without any improvement
It is always stuck there: “Sensor Gradle Sensor [kotlin] (done) | time=77901ms”

I tried to run modules with java code only and 10.2.1 was as fast as 9.9
I tried to run mixed java/kt modules and it get stuck again at “Sensor Gradle Sensor [kotlin]” then I excluded **/*.kt and analysis was again as fast as 9.9

Is there any option to print analysed files so I can compare times between 10.2.1 and 9.9?

Thanks

Vojtech

Hi Vojtech,

It’s possible that a --debug run might print the files, but I don’t think so (and the volume of logging you get from that is… unfortunate.)

Ehm… I’d have expected the first exclusion to work, but exclusions can be tricky to set analysis-side. That’s why I usually advise setting them via the UI. (Under the covers, they’re all multi-property values. For some of them, some ‘magic’ has been done to allow a comma-delimited list, but it can tempramental.) Maybe try it without the space?

Alternately, set an inclusion on `**/*.java’.

 
HTH,
Ann

Hi,

Thanks I will try --debug.
Just to clarify my configuration on mixed java/kotlin modules(they have more java than kotlin code):

Fast:

 property "sonar.test.exclusions", "**/\*.kts, **/\*.gradle, **/*.kt"
 property "sonar.exclusions", "\*\*/*.kts, **/\*.gradle, **/*.kt"

Slow (Stuck at Gradle Sensor, ±4x slower)

 property "sonar.test.exclusions", "\*\*/\*.kts, \*\*/\*.gradle"
 property "sonar.exclusions", "\*\*/\*.kts, \*\*/\*.gradle"

I will also try UI but I don’t expect any difference.

1 Like

sonarqube-10.2.1-debug.txt (20.6 KB)

Debug log for Gradle Sensor

Thanks

So it looks like GitHub - SonarSource/sonar-scanner-gradle: SonarQube Scanner for Gradle issue. After downgrading to version 4.2 it is significantly faster

Downgrading sonar-scanner-gradle from the latest version to 4.2 reduced time for 200+ modules from 4h to 15 min

I tested multiple versions and since 4.3.1.3277 the analysis is extremely slow

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.