U4-8458 - Transaction was deadlocked: SQL Server event report

Created by GC 16 May 2016, 14:13:45 Updated by Tom Daria 13 Feb 2017, 11:55:13

Multiple deadlock reports from SQL Server. Problem encountered on sites running v7.3.3, 7.3.4 and 7.3.6, all hosted on load balanced server.

No obvious trigger that I can see.

Trace log contents relating to an example deadlock below:

2016-05-08 09:13:43,005 [P6340/D2/T40] ERROR Umbraco.Core.Persistence.UmbracoDatabase - Database exception occurred System.Data.SqlClient.SqlException (0x80131904): Transaction (Process ID 154) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows) at System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more) at System.Data.SqlClient.SqlDataReader.Read() at Umbraco.Core.Persistence.Database.<Query>d__71.MoveNext() ClientConnectionId:560aeac8-2190-401e-9492-3c42c05eb75b Error Number:1205,State:51,Class:13 2016-05-08 09:13:43,005 [P6340/D2/T40] ERROR Umbraco.Web.Strategies.ServerRegistrationEventHandler - Failed to update server record in database. System.Data.SqlClient.SqlException (0x80131904): Transaction (Process ID 154) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows) at System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more) at System.Data.SqlClient.SqlDataReader.Read() at Umbraco.Core.Persistence.Database.<Query>d__71.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Umbraco.Core.Persistence.Repositories.ServerRegistrationRepository.ReloadCache() at Umbraco.Core.Services.ServerRegistrationService.<>c__DisplayClass6.<TouchServer>b__2(LockedRepository1 xr) at Umbraco.Core.Persistence.LockingRepository1.WithWriteLocked(Action1 action, Boolean autoCommit) at Umbraco.Core.Services.ServerRegistrationService.TouchServer(String serverAddress, String serverIdentity, TimeSpan staleTimeout) at Umbraco.Web.Strategies.ServerRegistrationEventHandler.RegisterServer(UmbracoRequestEventArgs e) ClientConnectionId:560aeac8-2190-401e-9492-3c42c05eb75b Error Number:1205,State:51,Class:13

Comments

Tom Daria 13 Feb 2017, 11:55:13

I am in a network load balance scenario. Our set up is 2 front end web servers running on Windows 2012 servers with IIS 8. In our current version of Umbraco (v7.4.2) I have noticed the following re-occurring error.

Is this normal as it appears to clear itself up over time and our users are not complaining about any content issues. If not, can you offer any suggestions on how to resolve our deadlocks?

Note: I have spun up a second instance of Umbraco v7.5.9 on the same two front end web servers and I see the same error message in a different database of course.

Thanks

Tom


Priority: Normal

Type: Bug

State: Submitted

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.3.3, 7.3.4, 7.3.6, 7.4.2, 7.5.9

Due in version:

Sprint:

Story Points:

Cycle: