Confluence hangs when trying to add/manage users or during log in
Problem
- Confluence is backed by a Microsoft SQL Server database
- When going to Confluence Admin > Users (or 'Manage Users' on some Confluence versions), attempting to add a new user causes the application to hang (loading indefinitely)
- When logging in to Confluence, the application will hang and no longer load any pages until the browser is closed.
- In some variations of this problem, the 'Manage Users' link itself does not load. Other administration links will continue to work.
- This behavior may be cleared up temporarily by a restart of Confluence, but will return after some time
- There may not be any errors in the
atlassian-confluence.log
file
Cause
Your Confluence database might not be using the recommended transaction isolation level, which is 'Read-Committed with Row Versioning', which can lead to database deadlocks.
Resolution
Run the following on your SQL Server to determine whether you are using 'Read-Committed with Row Versioning'. Replace '<database name>' with the actual name of your Confluence database.
SELECT sd.is_read_committed_snapshot_on FROM sys.databases AS sd WHERE sd.[name] = '<database name>';
If it returns '1', your database is already using the recommended isolation level. If it returns '0', please run the following to set the transaction isolation level:
ALTER DATABASE <database name> SET READ_COMMITTED_SNAPSHOT ON WITH ROLLBACK IMMEDIATE;
Please prepare a full database backup prior to run any query against your database.
More information on SQL Server isolation levels can be found in the Microsoft documentation.