Crowd hanging after upgrade to 2.7
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
:
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:
- CWD-3692 - Crowd freezes under heavy load
- CWD-3688 - Transaction errors due to cwd_token constraint violation
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.
Last modified on Jan 27, 2025
Powered by Confluence and Scroll Viewport.