Upgrade from SonarQube 8.9.9 to 9.9.2 causes MSSQL deadlocks

Hi all,

This error still persists on sonar after all this time. Last weekend we upgraded sonarqube to 9.9.8 in the hope that this was something caused by the database connector or some obscure bug in sonar, however we still see the same issues;



2025.01.21 16:08:08 ERROR web[AZR51aUxegWV2rC8F+fZ][o.s.s.w.WebServiceEngine] Fail to process request http://SONARURL/api/settings/set?component=com.ponent%3AAPPNAME%3Abugfix-CPIT-11630_alt&key=sonar.core.startTime&value=2022-08-12T17%3A41%3A54%2B0200
org.apache.ibatis.exceptions.PersistenceException:

Error updating database. Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 303) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

The error may exist in org.sonar.db.property.PropertiesMapper

The error may involve org.sonar.db.property.PropertiesMapper.delete-Inline

The error occurred while setting parameters

SQL: delete from properties where prop_key=? and component_uuid=? and user_uuid is null

Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 303) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.



Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 303) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

As verified in this thread before, we indeed have READ_COMMITTED_SNAPSHOT=1 on the database, for both our enterprise and community version of sonarcube, however we only see this issue on sonarqube community 9.9.8

Any help would make this application a ton more useful to us, has anyone ran into the same issue?

Kindest of regards
Jonas