we are running self hosted SonarQube Developer Edition - Version 9.9 (build 65466). After recent upgrade from 9.5 we see dramatic increase of background time taken by analysis. Before it was about 1-2 seconds, now it’s 1-20 minutes.
Snapshot of background tasks log from 23.3.2023 when it was upgraded:
11:04:02 AM|11:04:04 AM|11:05:43 AM|1min 39s|
March 23, 2023|6:09:55 PM|6:09:56 PM|6:18:10 PM|8min 14s||
12:07:50 PM|12:38:35 PM|12:38:36 PM|1.195s||
12:37:48 PM|12:37:49 PM|880ms||
Can you please help us what could be root cause of the issue?
What database are you using (PostgreSQL, MSSQL, Oracle)…?
thanks for reply and sorry for not putting this info. It’s
Microsoft SQL Server 15.00.4280, driver Microsoft JDBC Driver 11.2 for SQL Server
Is there anything we can check on the database?
Thanks a lot,
My first recommendation would be that you make sure you’ve run database maintenance (that is typically automated in big setups) such as refreshing database statistics and the indexes of each table. A lot of data shifts around during upgrades, which means up-to-date statistics and indexes are important for performance.
I learned today of an internal investigation related to Microsoft SQL Server performance and SonarQube v9.9 LTS.
While I still recommend the steps I previously outlined, I’ll keep you up to date here about any other findings (and somebody from the team may get in touch as well!)
Thank you Colin, I’m out of office this week, but we will check your recommendation, and also we stay tuned for any kind of news about the findings of your colleagues.
Dear Colin, any news on the investigation with MS SQL you referenced last time? I asked our IT do DB maintenance, they should do it regularly.
There is an unreleased fix for SQL Server performance: [SONAR-19513] - Jira
To understand if it’s the same issue, do you experience this same behavior?
So far the only workaround is to restart the node, though the issue comes back after some time.