Background tasks at compute new coverage step taking 20–60 minutes with only 2–3 files changed

Hi everyone,

We are experiencing very long execution times in the Compute Engine background task, specifically in the step:

**Compute new coverage
**
SQ version : 24.12

Problem

The scanner phase finishes quickly, but the Compute Engine background task takes 20–60 minutes before completing. and we identify what is causing the issue even though the process and logs looks similar for the jobs which took long time and less time.

From CE logs:

Compute new coverage | status=SUCCESS | time=3744743ms

Example duration:

3744743 ms ≈ 62 minutes

This delays in getting status as the background task taking time.

Important observation

This occurs even when the PR contains only 2–3 changed files.

  1. The issue does not occur for all projects
  2. It happens only for a few projects and only for some PR jobs
  3. The same project may sometimes run fast and sometimes very slow
  4. There is no memery, cpu issue and no spikes during those jobs run

Coverage metrics

In Sonar UI we see:

Coverage = 0
Lines to Cover = 0

So no coverage data appears to be imported.

Configuration

Relevant scanner properties:

sonar.scm.disabled=true
sonar.coverage.exclusions=**/aura/**,**/pages/**
sonar.sources=/analysis/src

PR comparison:

sonar.comparison.base=master
sonar.comparison.branch=<feature branch>

Logs

Only this step is slow:

Compute size measures | time=0ms
Compute new coverage | time=3744743ms
Compute coverage measures | time=0ms
Compute comment measures | time=0ms

Scanner-context:

  • sonar.auth.auth0.enabled=true
    
    sonar.auth.auth0.removeAfterPipe=true
    
    sonar.auth.saml2.enabled=true
    
    sonar.builtInQualityProfiles.disableNotificationOnUpdate=true
    
    sonar.core.id=E2EA3061-AXxgGoWxLn1CJXu_IB4M
    
    sonar.core.startTime=2026-03-01T07:48:25+0000
    
    sonar.coverage.exclusions=/aura/,/pages/
    
    sonar.cs.file.suffixes=.cs,.razor
    
    sonar.css.file.suffixes=.css,.less,.scss,.sass
    
    sonar.dbcleaner.branchesToKeepWhenInactive=master,develop,trunk
    
    sonar.flex.file.suffixes=as
    
    sonar.forceAuthentication=true
    
    sonar.go.file.suffixes=.go
    
    sonar.html.file.suffixes=.html,.xhtml,.cshtml,.vbhtml,.aspx,.ascx,.rhtml,.erb,.shtm,.shtml,.twig
    
    sonar.ipynb.file.suffixes=ipynb
    
    sonar.java.file.suffixes=.java,.jav
    
    sonar.javascript.file.suffixes=.js,.jsx,.cjs,.mjs,.vue
    
    sonar.javascript.globals=angular,goog,google,OpenLayers,d3,dojo,dojox,dijit,Backbone,moment,casper,$A,AuraContext,AuraSerializationService,AuraExpressionService,AuraEventService,AuraLocalizationService,AuraStorageService,AuraStyleService,MetricsService,AuraDevToolService,Component,CKEDITOR,FORCE,iScroll,unescape,Promise,Visualforce,sforce,Set
    
    sonar.jsp.file.suffixes=.jsp,.jspf,.jspx
    
    sonar.kotlin.file.suffixes=.kt,.kts
    
    sonar.mule.file.suffixes=.abcd
    
    sonar.multi-quality-mode.enabled=false
    
    sonar.organizations.anyoneCanCreate=false
    
    sonar.organizations.createPersonalOrg=false
    
    sonar.organizations.defaultPublicVisibility=false
    
    sonar.php.file.suffixes=php,php3,php4,php5,phtml,inc
    
    sonar.plugins.risk.consent=ACCEPTED
    
    sonar.projectCreation.mainBranchName=master
    
    sonar.python.file.suffixes=py
    
    sonar.qualityProfiles.allowDisableInheritedRules=false
    
    sonar.ruby.file.suffixes=.rb
    
    sonar.scala.file.suffixes=.scala
    
    sonar.scm.disabled=true
    
    sonar.sf.file.suffixes=.trigger,.cls
    
    sonar.sfmeta.file.suffixes=.settings
    
    sonar.typescript.file.suffixes=.ts,.tsx,.cts,.mts
    
    sonar.vbnet.file.suffixes=.vb
    
    sonar.vf.file.suffixes=.page,.component,.app,.evt,.cmp,.intf
    Project server settings:
    
    sonar.cs.file.suffixes=.cs,.razor
    
    sonar.css.file.suffixes=.css,.less,.scss,.sass
    
    sonar.flex.file.suffixes=as
    
    sonar.go.file.suffixes=.go
    
    sonar.html.file.suffixes=.html,.xhtml,.cshtml,.vbhtml,.aspx,.ascx,.rhtml,.erb,.shtm,.shtml,.twig
    
    sonar.ipynb.file.suffixes=ipynb
    
    sonar.java.file.suffixes=.java,.jav
    
    sonar.javascript.file.suffixes=.js,.jsx,.cjs,.mjs,.vue
    
    sonar.jsp.file.suffixes=.jsp,.jspf,.jspx
    
    sonar.kotlin.file.suffixes=.kt,.kts
    
    sonar.mule.file.suffixes=.abcd
    
    sonar.php.file.suffixes=php,php3,php4,php5,phtml,inc
    
    sonar.python.file.suffixes=py
    
    sonar.ruby.file.suffixes=.rb
    
    sonar.scala.file.suffixes=.scala
    
    sonar.sf.file.suffixes=.trigger,.cls
    
    sonar.sfmeta.file.suffixes=.settings
    
    sonar.typescript.file.suffixes=.ts,.tsx,.cts,.mts
    
    sonar.vbnet.file.suffixes=.vb
    
    sonar.vf.file.suffixes=.page,.component,.app,.evt,.cmp,.intf
    Project scanner properties:
    
    sonar.analysis.buildId=xxxxx
    
    sonar.analysis.buildJobContextId=xxxxx
    
    sonar.comparison.base=master
    
    sonar.comparison.branch=tod
    
    sonar.exclusions=
    
    sonar.java.binaries=.
    
    sonar.links.ci=
    
    sonar.organization=boi
    
    sonar.projectBaseDir=/opt/analysis/src
    
    sonar.projectKey=00d0e00000
    
    sonar.projectName=Pre-Prod
    
    sonar.projectVersion=1.0
    
    sonar.scanner.app=AnalysisApp
    
    sonar.scanner.appVersion=1.1
    
    sonar.sourceEncoding=utf8
    
    sonar.sources=/opt/analysis/src
    
    sonar.userHome=/tmp
    
    sonar.working.directory=/opt/analysis/src/.scannerwork
    

    Question

Why would Compute new coverage take tens of minutes even when:

  • PR contains only 2–3 files

  • Coverage metrics are zero

  • No coverage report seems to be imported

Is this step still traversing the entire project tree, or could something else trigger excessive processing?

Any suggestions for diagnosing or reducing the runtime of this step would be appreciated.

Thanks!

Hi,

Welcome to the community!

Only the latest version of SonarQube Community Build is considered active, so you’ll need to update and see if the situation is still replicable before we can help you.

Your update path is:

24.12 → 26.1 → 26.3

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after update, please come back to us.

 
Ann

Hi,

it is replicable even in latest version, I believe its not related to any version issue.

thanks,

Hi, I was mistaken in my previous post; in reality, the Background tasks are still experiencing delays even in the most recent versions of SQ. It’s only applicable to few branches and projects, and we haven’t been able to identify the root cause or specific reason. And we haven’t notice any pattern while BG tasks are taking longer time.

Scanner context is same for the jobs that are taking short and longer times. and PR has only few files.

Hi,

Is the slowdown in the same spot?

Can you provide the detailed CE logs from an analysis processing task?

Have you tried granting the Compute Engine more memory via the sonar.ce.javaOpts property?

And can you characterize the project(s) this happens on? How many files? Lines of code?

 
Ann

Hi,

yes, it is taking longer time in the same step and we haven’t observed any memory spikes during that task execution and yes, there is enough memory.
it is happening for few projects only and it has some 5k lines in the master branch, and PR’s has only 200 lines.
it is taking longer time for few PR’s not for all and we cannot exactly distinguish between those PR’s because the scanner context and all other configuration is same.
It is completely happening randomly which is why we cannot identify anything.


{"process":"ce","ceTaskUuid":"********","timestamp":"2026-03-05T10:18:27.037Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Extract report | status=SUCCESS | time=6ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.038Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Add  jobId MDC variable. | status=SUCCESS | time=0ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.041Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Add  jobId MDC variable. | status=SUCCESS | time=3ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.047Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Persist scanner context | status=SUCCESS | time=6ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.047Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Propagate analysis warnings from scanner report | status=SUCCESS | time=0ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.047Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Generate analysis UUID | status=SUCCESS | time=0ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.058Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Load analysis metadata | status=SUCCESS | time=10ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.059Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Initialize | status=SUCCESS | time=0ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.064Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Build tree of components | components=21 | status=SUCCESS | time=5ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.067Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Validate project | status=SUCCESS | time=3ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.756Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Load quality profiles | status=SUCCESS | time=688ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.757Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"This step pushes telemetry data from the Sonar analyzers to Telemetry V2 server in case telemetry is enabled. | status=SUCCESS | time=0ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.761Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Build list of dependencies | dependencies=0 | status=SUCCESS | time=4ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.762Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Checks executed before computation of measures | status=SUCCESS | time=0ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.765Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Generate SQ Upgrade analysis events | status=SUCCESS | time=3ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.768Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Load file hashes and statuses | status=SUCCESS | time=2ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.778Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Load Quality gate | status=SUCCESS | time=5ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.779Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Load new code period | status=SUCCESS | time=0ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.784Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Load prioritized rules | status=SUCCESS | time=5ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.786Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Detect file moves | status=SUCCESS | time=0ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.876Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Detect file moves in Pull Request scope | reportFiles=17 | dbFiles=6313 | movedFiles=0 | addedFiles=17 | status=SUCCESS | time=90ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.877Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Load duplications | duplications=0 | status=SUCCESS | time=1ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.877Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Compute cross project duplications | status=SUCCESS | time=0ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:18:27.878Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Compute size measures | status=SUCCESS | time=0ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:41:14.972Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Compute new coverage | status=SUCCESS | time=1367093ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:41:14.973Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Compute coverage measures | status=SUCCESS | time=0ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:41:14.973Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Compute comment measures | status=SUCCESS | time=0ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:41:14.974Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Compute duplication measures | status=SUCCESS | time=0ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:41:14.974Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Compute size measures on new code | status=SUCCESS | time=0ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:41:14.974Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Compute language distribution | status=SUCCESS | time=0ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:41:14.974Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Compute test measures | status=SUCCESS | time=0ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:41:14.974Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Compute complexity measures | status=SUCCESS | time=0ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:41:14.975Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Load measure computers | status=SUCCESS | time=0ms"}

{"process":"ce","jobId":"abcdid","ceTaskUuid":"*********","timestamp":"2026-03-05T10:41:14.979Z","severity":"INFO","logger":"org.sonar.ce.task.step.ComputationStepExecutor","message":"Compute Quality Profile status | status=SUCCESS | time=4ms"}

Hi,

This version number indicates you’re on Community Build.

Community Build doesn’t support pull request analysis.

I can’t help you.

 
Ann