SonarQube publishing task is timingout/taking too long to report findings back to Azure DevOps

Issue: SonarQube publishing task is timing out or taking way too long to report findings back to Azure DevOps pipeline
WARNING MESSAGE: ##[warning]Task ‘9d844899-6c86-4af2-ac96-b3f3fcc2b887’ takes too long to complete. Stopping after 1200s of polling. No quality gate will be displayed on build result

• **SonarQube Server Info & Specs:**
	○ OS: Ubuntu 20.04.5
	○ SonarQube Version: Developer Edition v10.6 (92116)
	○ Memory: 64 Gig
	○ Architecture: x86_64
	○ CPU Model name: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
	○ JVM Memory Allocation:
		§ sonar.web.javaOpts=-Xmx12288m -Xms4096m -XX:MaxDirectMemorySize=6144m -XX:+HeapDumpOnOutOfMemoryError
		§ sonar.ce.javaOpts=-Xmx20480m -Xms10240m -XX:+HeapDumpOnOutOfMemoryError
		§ sonar.search.javaOpts=-Xmx10240m -Xms10240m -XX:MaxDirectMemorySize=10240m -XX:+HeapDumpOnOutOfMemoryError
		§ Breakdown:
			1) sonar.web.javaOpts:
				® Maximum Heap Size (-Xmx): 12 GB (12288m)
				® Initial Heap Size (-Xms): 4 GB (4096m)
				® Direct Memory Size (-XX:MaxDirectMemorySize): 6 GB (6144m)
				® Heap Dump on OutOfMemoryError: Enabled
			2) sonar.ce.javaOpts:
				® Maximum Heap Size (-Xmx): 20 GB (20480m)
				® Initial Heap Size (-Xms): 10 GB (10240m)
				® Heap Dump on OutOfMemoryError: Enabled
			3) sonar.search.javaOpts:
				® Maximum Heap Size (-Xmx): 10 GB (10240m)
				® Initial Heap Size (-Xms): 10 GB (10240m) - Fixed Heap Size
				® Direct Memory Size (-XX:MaxDirectMemorySize): 10 GB (10240m)
				® Heap Dump on OutOfMemoryError: Enabled

Log Analysis:
• The logs were pretty clean. No errors. They were more or less the same with nothing that stands out. Below is part of the ce.log for one of the scan that took about 21 minutes.
• es.log
• ce.log
• web.log

Programming Language: .Net Core 8

Log Sample:

2024.08.12 18:09:38 INFO  ce[][o.s.c.t.CeWorkerImpl] Execute task | project=MyProjectName.RepoName_73937eb0-ef31-45cc-8097-465ef0ee3125 | type=REPORT | id=9d844899-6c86-4af2-ac96-b3f3fcc2b887 | submitter=Homer.Simpsons_63588
2024.08.12 18:09:45 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Extract report | status=SUCCESS | time=6990ms

2024.08.12 18:09:45 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Persist scanner context | status=SUCCESS | time=14ms
2024.08.12 18:09:45 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Propagate analysis warnings from scanner report | status=SUCCESS | time=20ms
2024.08.12 18:09:45 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Generate analysis UUID | status=SUCCESS | time=0ms
2024.08.12 18:09:45 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Load analysis metadata | status=SUCCESS | time=8ms
2024.08.12 18:09:45 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Initialize | status=SUCCESS | time=15ms
2024.08.12 18:09:46 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Build tree of components | components=4820 | status=SUCCESS | time=153ms
2024.08.12 18:09:46 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Validate project | status=SUCCESS | time=6ms
2024.08.12 18:09:48 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Load quality profiles | status=SUCCESS | time=1943ms
2024.08.12 18:09:48 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Checks executed before computation of measures | status=SUCCESS | time=7ms
2024.08.12 18:09:48 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Generate SQ Upgrade analysis events | status=SUCCESS | time=5ms
2024.08.12 18:09:48 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Load file hashes and statuses | status=SUCCESS | time=235ms
2024.08.12 18:09:48 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Load Quality gate | status=SUCCESS | time=8ms
2024.08.12 18:09:48 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Load new code period | status=SUCCESS | time=22ms
2024.08.12 18:09:48 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Load prioritized rules | status=SUCCESS | time=11ms
2024.08.12 18:09:48 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Detect file moves | reportFiles=4093 | dbFiles=4093 | addedFiles=0 | status=SUCCESS | time=116ms
2024.08.12 18:09:48 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Detect file moves in Pull Request scope | status=SUCCESS | time=0ms
2024.08.12 18:09:48 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Load duplications | duplications=459 | status=SUCCESS | time=66ms
2024.08.12 18:09:48 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Compute cross project duplications | status=SUCCESS | time=0ms
2024.08.12 18:09:48 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Compute size measures | status=SUCCESS | time=114ms
2024.08.12 18:10:05 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Compute new coverage | status=SUCCESS | time=16429ms
2024.08.12 18:10:05 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Compute coverage measures | status=SUCCESS | time=92ms
2024.08.12 18:10:05 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Compute comment measures | status=SUCCESS | time=8ms
2024.08.12 18:10:05 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Compute duplication measures | status=SUCCESS | time=8ms
2024.08.12 18:10:07 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Compute size measures on new code | status=SUCCESS | time=2026ms
2024.08.12 18:10:07 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Compute language distribution | status=SUCCESS | time=8ms
2024.08.12 18:10:07 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Compute test measures | status=SUCCESS | time=6ms
2024.08.12 18:10:07 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Compute complexity measures | status=SUCCESS | time=15ms
2024.08.12 18:10:07 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Load measure computers | status=SUCCESS | time=0ms
2024.08.12 18:10:07 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Compute Quality Profile status | status=SUCCESS | time=7ms
2024.08.12 18:11:03 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Execute component visitors | status=SUCCESS | time=56607ms
2024.08.12 18:11:03 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Checks executed after computation of measures | status=SUCCESS | time=12ms
2024.08.12 18:11:03 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Compute pull request fixed issues measure | status=SUCCESS | time=0ms
2024.08.12 18:11:03 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Compute Quality Gate measures | status=SUCCESS | time=1ms
2024.08.12 18:11:03 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Compute Quality profile measures | status=SUCCESS | time=2ms
2024.08.12 18:11:03 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Generate Quality profile events | status=SUCCESS | time=6ms
2024.08.12 18:11:03 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Generate Quality gate events | status=SUCCESS | time=6ms
2024.08.12 18:11:03 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Generate Issue Detection events | status=SUCCESS | time=6ms
2024.08.12 18:11:03 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Check upgrade possibility for not analyzed code files. | status=SUCCESS | time=0ms
2024.08.12 18:11:04 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Persist scanner analysis cache | status=SUCCESS | time=139ms
2024.08.12 18:11:04 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Persist components | status=SUCCESS | time=115ms
2024.08.12 18:11:04 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Persist analysis | status=SUCCESS | time=8ms
2024.08.12 18:11:04 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Persist analysis properties | status=SUCCESS | time=17ms
2024.08.12 18:11:04 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Persist measures | inserts=57 | status=SUCCESS | time=64ms
2024.08.12 18:30:23 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Persist live measures | insertsOrUpdates=194423 | status=SUCCESS | time=1159120ms
2024.08.12 18:30:42 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Persist duplication data | insertsOrUpdates=101 | status=SUCCESS | time=18910ms
2024.08.12 18:30:42 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Persist new ad hoc Rules | status=SUCCESS | time=0ms
2024.08.12 18:30:42 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Persist issues | cacheSize=25.9 kB | inserts=0 | updates=34 | merged=0 | status=SUCCESS | time=69ms
2024.08.12 18:30:42 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Delete issue changes | changes=0 | status=SUCCESS | time=0ms
2024.08.12 18:30:42 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Persist project links | status=SUCCESS | time=3ms
2024.08.12 18:30:42 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Persist events | status=SUCCESS | time=9ms
2024.08.12 18:30:44 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Persist sources | status=SUCCESS | time=1794ms
2024.08.12 18:30:44 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Persist cross project duplications | status=SUCCESS | time=0ms
2024.08.12 18:30:44 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Enable analysis | status=SUCCESS | time=38ms
2024.08.12 18:30:44 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Persist Fixed issues in Pull Request | status=SUCCESS | time=0ms
2024.08.12 18:30:44 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Update last usage date of quality profiles | status=SUCCESS | time=24ms
2024.08.12 18:30:53 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Purge db | status=SUCCESS | time=9699ms
2024.08.12 18:30:53 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Load changed issues for indexing | status=SUCCESS | time=0ms
2024.08.12 18:30:54 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Index analysis | status=SUCCESS | time=131ms
2024.08.12 18:30:54 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Update need issue sync for branch | status=SUCCESS | time=8ms
2024.08.12 18:30:54 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Compute total Project ncloc | status=SUCCESS | time=10ms
2024.08.12 18:30:54 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Publishing taint vulnerabilities and security hotspots events | status=SUCCESS | time=5ms
2024.08.12 18:30:54 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Send issue notifications | newIssuesNotifs=0 | newIssuesDeliveries=0 | myNewIssuesNotifs=0 | myNewIssuesDeliveries=0 | changesNotifs=0 | changesDeliveries=0 | status=SUCCESS | time=7ms
2024.08.12 18:30:54 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Actions to execute when the computation is about to be finished | status=SUCCESS | time=0ms
2024.08.12 18:30:54 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Publish task results | status=SUCCESS | time=0ms
2024.08.12 18:30:54 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Trigger refresh of Portfolios and Applications | refreshesAPP=0 | status=SUCCESS | time=6ms
2024.08.12 18:30:54 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Webhooks | globalWebhooks=0 | projectWebhooks=0 | status=SUCCESS | time=6ms
2024.08.12 18:30:54 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Pull Request decoration | status=SUCCESS | time=0ms
2024.08.12 18:30:54 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Report branch Quality Gate status to devops platforms | status=SUCCESS | time=4ms

The below line stood out from the log:

2024.08.12 18:30:23 INFO  ce[601e7a42-b44c-4c7b-9529-06f3702338c1][o.s.c.t.s.ComputationStepExecutor] Persist live measures | insertsOrUpdates=194423 | status=SUCCESS | time=1159120ms

What we have tried so far:

  • sonar.qualitygate.wait=true
  • sonar.qualitygate.timeout=1800
  • Invetigation: Only one background task was running during the scan
  • Read several articles from the community related to the topic

That sure is a long time (20 minutes). What type of Database server is backing your instance? Oracle / Postgresql / MSSQL?

Thanks for replying, Colin! It’s a MSSQL Database. We’ve been monitoring the SQL server and the database, there is no resource contention at all. It is such a weird and unusual case. This one is really a head scratcher.

Hey there.

Drat, I was hoping that you’d say Postgres! Because usually, the fix is pretty easy..

A few more questions:

  • Is this the only project affected? Or do background tasks take a long time in general? You can check the global Administration > Projects > Background Tasks
  • is is_read_committed_snapshot_on set to true?
  • How closely located is your SonarQube server to the SQL server? Any lag or latency can have a dramatic impact here.
  • Asking your DBAs to refresh the indexes and statistics of your SonarQube database can help with performance if for some reason they have grown stale

Hi Colin,

lol sorry for the MSSQL.

Is this the only project affected?

  • Unfortunately, that’s not the only project that is impacted. We have projects in Golang and React that are sporadically demonstrating this performance degradation. Please see below screenshot.

Is is_read_committed_snapshot_on set to true?

  • That property is not turned on (please see second screenshot). I just turned on, let’s wait and see.

How closely located is your SonarQube server to the SQL Server?

  • They are both on the same virtual network, but different subnet.
  • Sonar Subnet: 10.33.2.0/26
  • SQL Subnet: 10.33.4.0/24
  • In terms of latency and lag, there aren’t any.

Asking your DBA’s to refresh indexes and statistics of your SonarQube database can help with the performance if for some reason they have grown stale

  • Unfortunately, we’re the last line of defense. However, I do think this could very well be an indexing issue. I’ll dig deeper into it and will report back.
  • Any advice or trick for testing out and fine tuning the index?

Sonar Instance Background Tasks Screenshot:

is_read_committed_snapshot_on Screenshot:

Crossing my fingers this makes a difference.

It has been a long time since I was a SQL Server Admin (and I wasn’t really, it was just because my old company’s SonarQube server was hooked up to SQL Server, and I had too much access). The goal for right now should just me to make sure the index is up to date (decrease fragmentation) and statistics are updated. Usually this is handled automatically on a well configured SQL Server… but I know they aren’t all well-configured. :smiley:

I don’t recommend changing the indexes, or adding any – just making sure what you’ve got is up-to-date.

The important table for this step in the Compute Engine (if it’s useful to be more targeted for now) is the live_measures table.

Hi Colin,

is_read_committed_snapshot_on is enabled and will wait until tomorrow to see if there is any performance improvement. I don’t want to make too many changes all at once, and later not knowing exactly what did improve the performance.

Next, tomorrow I will be reorganizing the index on some key tables. First step is to reorganize them, then monitor for a few days to see if there are any performance improvement. If not, then I’ll proceed to rebuilding the index on those tables.

After enlisting the help of my AI Friend, Llama 3.1, below is the query I will be using to carry out the plan mentioned above. By any chance, are you aware of any other tables that should be included?

Colin, thank you so much for all the tips and pointers! I really appreciate it and will follow up in a few days with

Query for reorganizing or rebuilding table index:

**-- FIRST STEP: Reorganizing Index on key CE based tables**
ALTER INDEX ALL ON [sonar].[dbo].[live_measures]
REORGANIZE;

ALTER INDEX ALL ON [sonar].[dbo].[ce_activity]
REORGANIZE;

ALTER INDEX ALL ON [sonar].[dbo].[ce_queue]
REORGANIZE;

ALTER INDEX ALL ON [sonar].[dbo].[ce_scanner_context]
REORGANIZE;

ALTER INDEX ALL ON [sonar].[dbo].[ce_task_characteristics]
REORGANIZE;

ALTER INDEX ALL ON [sonar].[dbo].[ce_task_input]
REORGANIZE;

ALTER INDEX ALL ON [sonar].[dbo].[ce_task_message]
REORGANIZE;

ALTER INDEX ALL ON [sonar].[dbo].[components]
REORGANIZE;

ALTER INDEX ALL ON [sonar].[dbo].[metrics]
REORGANIZE;

ALTER INDEX ALL ON [sonar].[dbo].[projects]
REORGANIZE;

ALTER INDEX ALL ON [sonar].[dbo].[project_qgates]
REORGANIZE;

ALTER INDEX ALL ON [sonar].[dbo].[quality_gates]
REORGANIZE;

**-- STEP 2: If after a few days, no improvement then REBUILD the Index**
ALTER INDEX ALL ON [sonar].[dbo].[live_measures]
REBUILD WITH (ONLINE = ON);

ALTER INDEX ALL ON [sonar].[dbo].[ce_activity]
REBUILD WITH (ONLINE = ON);

ALTER INDEX ALL ON [sonar].[dbo].[ce_queue]
REBUILD WITH (ONLINE = ON);

ALTER INDEX ALL ON [sonar].[dbo].[ce_scanner_context]
REBUILD WITH (ONLINE = ON);

ALTER INDEX ALL ON [sonar].[dbo].[ce_task_characteristics]
REBUILD WITH (ONLINE = ON);

ALTER INDEX ALL ON [sonar].[dbo].[ce_task_input]
REBUILD WITH (ONLINE = ON);

ALTER INDEX ALL ON [sonar].[dbo].[ce_task_message]
REBUILD WITH (ONLINE = ON);

ALTER INDEX ALL ON [sonar].[dbo].[components]
REBUILD WITH (ONLINE = ON);

ALTER INDEX ALL ON [sonar].[dbo].[metrics]
REBUILD WITH (ONLINE = ON);

ALTER INDEX ALL ON [sonar].[dbo].[projects]
REBUILD WITH (ONLINE = ON);

ALTER INDEX ALL ON [sonar].[dbo].[project_qgates]
REBUILD WITH (ONLINE = ON);

ALTER INDEX ALL ON [sonar].[dbo].[quality_gates]
REBUILD WITH (ONLINE = ON);

I also ran a report to see in the last 30 days which projects/scans have taken longer than 10 minutes to complete. I’ll use that as base to compare tomorrow and the next few days as well after I’ve ran the query above.

Thanks!