Sonarlint plugin unusable due to CPU usage (one full core) due to permanent "Synchronizing projects"

Please provide

  • Operating system: ubuntu 22

  • SonarQube for IntelliJ plugin version: 10.22.0.81244

  • IntelliJ version: IntelliJ IDEA 2025.1.1 (Ultimate Edition)
    Build #IU-251.25410.109, built on May 7, 2025
    Source revision: 1710087d23ac7
    Licensed to Dynatrace Sp. z o.o. / Thomas Klambauer
    Subscription is active until October 31, 2025.
    Runtime version: 21.0.6+9-b895.109 amd64 (JCEF 122.1.9)
    VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
    Toolkit: sun.awt.X11.XToolkit
    Linux 6.8.0-59-generic
    Ubuntu 22.04.5 LTS; glibc: 2.35
    Kotlin plugin: K2 mode
    GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
    Memory: 13000M
    Cores: 16
    Registry:
    vcs.log.index.enable=true
    ide.experimental.ui=true
    jvm.dfa.analysis.ui.security.analysis.window.was.shown=true
    terminal.new.ui=true
    Non-Bundled Plugins:
    com.dynatrace.intellijplugin.owners (0.5.5)
    org.intellij.plugins.hcl (251.25410.59)
    VisualVMLauncher (1.23.1-IJ2023.3)
    CheckStyle-IDEA (5.105.0)
    org.jetbrains.plugins.github (251.25410.123-IU)
    com.dynatrace.intellij-plugin (1.3.0-251)
    org.sonarlint.idea (10.22.0.81244)
    Kotlin: 251.25410.109-IJ
    Current Desktop: ubuntu:GNOME

  • Programming language you’re coding in: java

  • Is connected mode used: sonarqube server

    • SonarQube Cloud, SonarQube Server, or SonarQube Community Build? (if one of the latter two, which version?): * Community Edition
  • v9.9.8 (build 100196)

And a thorough description of the problem / question:

for ~30 minutes (doesn’t seem to end), I have slow IDE and high CPU usage (like 1 out of 8 cores).

on the verbose output in the log tab I see permanently:

[2025-05-12T16:24:20.775] [sonarlint-branch-matcher] DEBUG sonarlint - Matching Sonar project branch
 [2025-05-12T16:24:20.776] [sonarlint-branch-matcher] DEBUG sonarlint - Matching Sonar project branch

thousands of entries.

and when it’s done, it’s starting right over, looks like this in the log:

 [2025-05-12T17:01:42.422] [sonarlint-branch-matcher] DEBUG sonarlint - Matching Sonar project branch
 [2025-05-12T17:01:42.56] [SonarLint Local Storage Synchronizer] INFO sonarlint - [SYNC] Synchronizing issues for project 'GROUP:PROJECT' on branch 'master'
 [2025-05-12T17:01:42.783] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - GET 200 https://SERVER_URL/api/issues/pull?projectKey=GROUP%3APROJECT&branchName=master&languages=css,web,java,js,kotlin,php,py,ruby,scala,secrets,swift,ts,xml,yaml,cloudformation,docker,kubernetes,terraform,ansible&changedSince=1747061761676 | response time=223ms
 [2025-05-12T17:01:42.783] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - Pulled issues in 223ms
 [2025-05-12T17:01:42.791] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - Merged 0 issues in store. Closed 0. | took 7ms
 [2025-05-12T17:01:42.791] [SonarLint Local Storage Synchronizer] INFO sonarlint - [SYNC] Synchronizing taint issues for project 'GROUP:PROJECT' on branch 'master'
 [2025-05-12T17:01:42.817] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - GET 200 https://SERVER_URL/api/issues/pull_taint?projectKey=GROUP%3APROJECT&branchName=master&languages=css,web,java,js,kotlin,php,py,ruby,scala,secrets,swift,ts,xml,yaml,cloudformation,docker,kubernetes,terraform,ansible&changedSince=1747061761775 | response time=24ms
 [2025-05-12T17:01:42.817] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - Pulled taint issues in 24ms
 [2025-05-12T17:01:42.818] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - Merged 0 taint issues in store. Closed 0. | took 0ms
 [2025-05-12T17:01:42.818] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - Incremental hotspot sync is not supported. Skipping.
 [2025-05-12T17:01:42.818] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - isReadyForAnalysis(connectionId: https://SERVER_URL, sonarProjectKey: GROUP:PROJECT, plugins: true, analyzer config: true, findings: true) => true
Did synchronize config scopes [PROJECT.server.openpipeline-sdlcevents.slowUnitTest]
 [2025-05-12T17:01:42.818] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - Synchronizing storage of connection 'https://SERVER_URL'
 [2025-05-12T17:01:42.838] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - GET 200 https://SERVER_URL/api/system/status | response time=19ms
 [2025-05-12T17:01:42.838] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - Downloaded server infos in 19ms
 [2025-05-12T17:01:42.859] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - GET 200 https://SERVER_URL/api/system/status | response time=20ms
 [2025-05-12T17:01:42.859] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - Downloaded server infos in 20ms
 [2025-05-12T17:01:42.859] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - Storing server info in /home/thomas/.cache/JetBrains/IntelliJIdea2025.1/sonarlint/storage/68747470733a2f2f636c75737465722d736f6e6172717562652e63692e64796e616c6162732e696f/server_info.pb
 [2025-05-12T17:01:42.859] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - Stored server info
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - GET 200 https://SERVER_URL/api/plugins/installed | response time=20ms
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] INFO sonarlint - Downloaded plugin list in 20ms
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - [SYNC] Code analyzer 'csharp' does not support SonarLint. Skip downloading it.
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - [SYNC] Code analyzer 'cxx' does not support SonarLint. Skip downloading it.
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - [SYNC] Code analyzer 'communityBranchPlugin' does not support SonarLint. Skip downloading it.
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - [SYNC] Code analyzer 'config' does not support SonarLint. Skip downloading it.
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - [SYNC] Code analyzer 'flex' does not support SonarLint. Skip downloading it.
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - [SYNC] Code analyzer 'go' is embedded in SonarLint. Skip downloading it.
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - [SYNC] Code analyzer 'web' is embedded in SonarLint. Skip downloading it.
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - [SYNC] Code analyzer 'iac' is embedded in SonarLint. Skip downloading it.
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - [SYNC] Code analyzer 'jacoco' does not support SonarLint. Skip downloading it.
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - [SYNC] Code analyzer 'java' is up-to-date. Skip downloading it.
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - [SYNC] Code analyzer 'javascript' is embedded in SonarLint. Skip downloading it.
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - [SYNC] Code analyzer 'kotlin' is embedded in SonarLint. Skip downloading it.
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - [SYNC] Code analyzer 'php' is up-to-date. Skip downloading it.
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - [SYNC] Code analyzer 'python' is up-to-date. Skip downloading it.
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - [SYNC] Code analyzer 'ruby' is embedded in SonarLint. Skip downloading it.
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - [SYNC] Code analyzer 'sonarscala' is up-to-date. Skip downloading it.
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - [SYNC] Code analyzer 'text' is embedded in SonarLint. Skip downloading it.
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - [SYNC] Code analyzer 'vbnet' does not support SonarLint. Skip downloading it.
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - [SYNC] Code analyzer 'xml' is embedded in SonarLint. Skip downloading it.
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - Known plugin paths: [/home/thomas/.cache/JetBrains/IntelliJIdea2025.1/sonarlint/storage/68747470733a2f2f636c75737465722d736f6e6172717562652e63692e64796e616c6162732e696f/plugins/sonar-php-plugin-3.27.1.9352.jar, /home/thomas/.cache/JetBrains/IntelliJIdea2025.1/sonarlint/storage/68747470733a2f2f636c75737465722d736f6e6172717562652e63692e64796e616c6162732e696f/plugins/sonar-scala-plugin-1.11.0.3905.jar, /home/thomas/.cache/JetBrains/IntelliJIdea2025.1/sonarlint/storage/68747470733a2f2f636c75737465722d736f6e6172717562652e63692e64796e616c6162732e696f/plugins/sonar-java-plugin-7.16.0.30901.jar, /home/thomas/.cache/JetBrains/IntelliJIdea2025.1/sonarlint/storage/68747470733a2f2f636c75737465722d736f6e6172717562652e63692e64796e616c6162732e696f/plugins/sonar-python-plugin-3.24.1.11916.jar]
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - Paths in dir: [/home/thomas/.cache/JetBrains/IntelliJIdea2025.1/sonarlint/storage/68747470733a2f2f636c75737465722d736f6e6172717562652e63692e64796e616c6162732e696f/plugins/sonar-python-plugin-3.24.1.11916.jar, /home/thomas/.cache/JetBrains/IntelliJIdea2025.1/sonarlint/storage/68747470733a2f2f636c75737465722d736f6e6172717562652e63692e64796e616c6162732e696f/plugins/plugin_references.pb, /home/thomas/.cache/JetBrains/IntelliJIdea2025.1/sonarlint/storage/68747470733a2f2f636c75737465722d736f6e6172717562652e63692e64796e616c6162732e696f/plugins/sonar-scala-plugin-1.11.0.3905.jar, /home/thomas/.cache/JetBrains/IntelliJIdea2025.1/sonarlint/storage/68747470733a2f2f636c75737465722d736f6e6172717562652e63692e64796e616c6162732e696f/plugins/sonar-java-plugin-7.16.0.30901.jar, /home/thomas/.cache/JetBrains/IntelliJIdea2025.1/sonarlint/storage/68747470733a2f2f636c75737465722d736f6e6172717562652e63692e64796e616c6162732e696f/plugins/sonar-php-plugin-3.27.1.9352.jar]
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - Unknown files: []
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - Synchronizing storage of Sonar project 'GROUP:PROJECT' for connection 'https://SERVER_URL'
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] INFO sonarlint - [SYNC] Synchronizing analyzer configuration for project 'GROUP:PROJECT'
 [2025-05-12T17:01:42.88] [SonarLint Local Storage Synchronizer] INFO sonarlint - [SYNC] Languages enabled for synchronization: [kubernetes, css, scala, kotlin, js, py, secrets, ruby, docker, ansible, java, web, xml, php, terraform, cloudformation, swift, ts, yaml]
 [2025-05-12T17:01:42.921] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - GET 200 https://SERVER_URL/api/settings/values.protobuf?component=GROUP%3APROJECT | response time=40ms
 [2025-05-12T17:01:42.922] [SonarLint Local Storage Synchronizer] INFO sonarlint - Downloaded settings in 40ms
 [2025-05-12T17:01:42.979] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - GET 200 https://SERVER_URL/api/qualityprofiles/search.protobuf?project=GROUP%3APROJECT | response time=57ms
 [2025-05-12T17:01:42.979] [SonarLint Local Storage Synchronizer] DEBUG sonarlint - Downloaded project quality profiles in 57ms
 [2025-05-12T17:01:42.979] [SonarLint Local Storage Synchronizer] INFO sonarlint - [SYNC] Active rules for 'cloudformation' are up-to-date
 [2025-05-12T17:01:42.979] [SonarLint Local Storage Synchronizer] INFO sonarlint - [SYNC] Active rules for 'css' are up-to-date
 [2025-05-12T17:01:42.979] [SonarLint Local Storage Synchronizer] INFO sonarlint - [SYNC] Active rules for 'docker' are up-to-date
 [2025-05-12T17:01:42.979] [SonarLint Local Storage Synchronizer] INFO sonarlint - [SYNC] Active rules for 'java' are up-to-date

UI mini status shows permanent “Synchronizing projects”.

we have a huge project with >500 gradles modules with multiple configurations.

with intellij CPU profiling, the plugin seems to run thousands of instances of “org.sonarlint.intellij.git.GitRepo.electBestMatchingServerBranchForCurrentHead(String, Set)” (per gradle module?) when indeed all the gradle modules are only in one repo and one git server and one branch.


picture

Hey @thomas-k-dev, sorry for the late reply.

I had a quick look and there’s probably some improvement to be made about how we compute the best matching branch for a SonarQube project. Likely we can cache the info.

I created this improvement ticket that we will try to tackle in an upcoming release.

Thanks! That would be of great help for huge projects to cut down time / effectively allowing to use the plugin again.

Hey @thomas-k-dev, we just released SonarQube for IntelliJ version 10.27. It includes some improvements on this topic. Feel free to update and see if you still notice any issues. If yes, please come back to us!

Thank you!

Hi!
Just installed it, restarted, bound it and indeed the synchronizing branches seems gone / faster. Thx already for that.

I was able to get a scan on one file going, but then now I’m seeing “waiting for sonarqube being ready” and in the log likely the reason:
" [2025-07-09T15:48:45.018812463] [Thread-45] ERROR org.sonarsource.sonarlint.core.rpc.client.SloopLauncher - StdErr: Exception in thread “httpclient-dispatch-9” java.lang.OutOfMemoryError: Java heap space"

as mentioned it’s a pretty big project. (running intellij with -Xmx13000m ). assuming this oom is from a separate JVM process for the intellj plugin?

Thank you for the quick update, we’re somehow making progress…

This OOM is coming from our Java process, I suspect that we are trying to ingest a huge amount of data (issues/taint/…) at once and it crashes. Do you have the full stack trace that could indicate on which step our process crashed?

ah, originally there was no stacktrace, but now there are some (see timestamps):

 [2025-07-09T15:48:45.018812463] [Thread-45] ERROR org.sonarsource.sonarlint.core.rpc.client.SloopLauncher - StdErr: Exception in thread "httpclient-dispatch-9" java.lang.OutOfMemoryError: Java heap space
 [2025-07-09T16:14:59.814] [SonarLint Server RPC request executor] ERROR org.eclipse.lsp4j.jsonrpc.RemoteEndpoint - Internal error: java.lang.OutOfMemoryError: Java heap space
java.util.concurrent.CompletionException: java.lang.OutOfMemoryError: Java heap space
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649)
	at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.OutOfMemoryError: Java heap space

 [2025-07-09T16:18:07.682] [SonarLint Server RPC request executor] ERROR org.eclipse.lsp4j.jsonrpc.RemoteEndpoint - Internal error: java.lang.OutOfMemoryError: Java heap space
java.util.concurrent.CompletionException: java.lang.OutOfMemoryError: Java heap space
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649)
	at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.OutOfMemoryError: Java heap space

and a few more similar ones

SonarQube for IDE runs in a custom JVM process under the name of SonarLintServerCli. You should try to increase the heap size of this process by setting this environment variable before starting your IDE:

SONARLINT_JVM_OPTS=-Xmx16g (or any other value you think is valuable)

Unfortunately, your project is exceptionally large and this is a known problem that we are working on. I hope that this workaround can help in the meantime.

Thanks! I’ll give that a try, not sure if I’m always gonna be able to spare much memory. Let’s see!

A small update: I think that helped a bit so that I am now able to run “analyze current file” in connection with our sonarqube server setup/rules.
but for “analyze vcs changed files” (my main use case in the daily workflow), I still get the OOM. maybe need some more mem. will play a bit more with the param