Crowd hanging after upgrade to 2.7
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
Crowd hangs after upgrading to version 2.7. Any applications connected to Crowd work for a short time until connection pool is used up. Crowd hangs on querying the cwd_token
table. This MAY appear in logs, but there have been instances where nothing is logged.
The following appears in the atlassian-jira.log
:
1
2
3
4
5
6
WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 2627, SQLState: 23000
ERROR [engine.jdbc.spi.SqlExceptionHelper] Violation of UNIQUE KEY constraint 'UQ_cwd_toke_0107550A5165187F'. Cannot insert duplicate key in object 'dbo.cwd_token'. The duplicate key value is (B3PdjS0O9UY10Td8q0Bp2g00).
ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch]
[jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1]
ERROR [[Catalina].[localhost].[/crowd].[default]] Servlet.service() for servlet [default] in context with path [/crowd] threw exception
org.springframework.orm.hibernate4.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
Cause
Locks on the cwd_token
table are not being released back to the pool. Related bug reports:
Workaround
Switch to in-memory session storage, as described in Session configuration.
Resolution
Fixed in Crowd 2.7.1. Upgrade to resolve or use workaround above.
Was this helpful?