Issue: Deadlock messages in Deploy logs

Issue

We sometimes see deadlock messages in the logging:

DELETE FROM SPRING_SESSION WHERE SESSION_ID = ?]

The deployment status is failed but the deployment itself looks good.

Affected Products & Versions

Deploy 9.7 and above with MSSQL Database

Cause

MS SQL Server does not have Multi-Version Concurrency Control (MVCC) activated by default. Deploy requires this feature to function correctly.

Workaround/Resolution Action

  1. You can enable snapshot isolation mode by executing the following commands on an SQL Server:
    ALTER DATABASE <database_name> SET ALLOW_SNAPSHOT_ISOLATION ON;
    ALTER DATABASE <database_name> SET READ_COMMITTED_SNAPSHOT ON;
    Also, can you make sure that you have followed the best practices mentioned in our documentation: https://docs.xebialabs.com/v.10.0/deploy/how-to/configure-the-xl-deploy-sql-repository/#best-practices-for-installation-and-schema-creation-for-sql-server
  2. We have noticed this issue with deadlocks in spring-session while using the MSSQL database. It recommended disabling the Active Sessions to prevent deadlocks in the tables.
    This can be done by adding the following line in the deployit.conf‚Äč file.
    active.user.sessions=false

Considerations

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.