Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bjorn 1 post 71 karma points
    Mar 03, 2016 @ 13:46
    Bjorn
    0

    7.3.5 Deadlock, umbracoServer query

    I'm having a recurring deadlock issue with a site running multiple instances on Azure. The offending query is:

    SELECT [umbracoServer].[id], [umbracoServer].[address], [umbracoServer].[computerName], [umbracoServer].[registeredDate], [umbracoServer].[lastNotifiedDate], [umbracoServer].[isActive], [umbracoServer].[isMaster] FROM [umbracoServer] WHERE id > 0
    

    Site is running 7.3.5 on latest Azure database, SQL 2016.

    The Umbraco configuration is pretty much standard with only 1 change in the web.config:

    <add key="umbracoContentXMLUseLocalTemp" value="false" />
    

    Any help would be appreciated!

  • Ansar 181 posts 291 karma points
    Mar 09, 2016 @ 15:30
    Ansar
    0

    We have the same issue in Umbraco 7.3.4 on a load balancing server - not Azure.

    Did you find the reason/solution?

    We are getting about 3 or 4 deadlocks a minute. They are all around the umbracoServer table, where multiple processes are trying to update this table.

    Thanks in advance

  • Gordon 15 posts 96 karma points
    May 11, 2016 @ 15:37
    Gordon
    0

    Hi Anz,

    Your set-up sounds the same as mine... Did you ever manage to fix this?

    If you are still stuck, here's what I've found out, as minimal as it is (and without any solution):

    Currently we only get these deadlocks in 7.3.4 - other versions we've used are ok (so far).

    The UmbracoTraceLog has entries which match the reported deadlock times, and mentions:

    ERROR Umbraco.Core.Persistence.UmbracoDatabase - Database exception occurred
    

    and

    ERROR Umbraco.Web.Strategies.ServerRegistrationEventHandler - Failed to update server record in database.
    

    I'm wondering if upgrading Umbraco would be the only way to fix this, but I'd need reassurance from Umbraco HQ that it would before I do anything.

    Good luck if you're still stuck with this issue too...!

    UPDATE: This has now started happening on a 7.3.3 and 7.3.6 site too.

  • andrew shearer 510 posts 659 karma points
    Mar 15, 2016 @ 20:32
    andrew shearer
    0

    hi - any news on this issue?

  • Gordon 15 posts 96 karma points
    May 09, 2016 @ 09:34
    Gordon
    0

    Has this issue been addressed anywhere, does anybody know?

    Same issue for me on 7.3.3, 7.3.4 and 7.3.6 load balanced servers.

    In the absence of any news I've raised a bug here.

  • Bach Huong 6 posts 98 karma points
    Aug 23, 2016 @ 13:22
    Bach Huong
    0

    Hi Gordon and all,

    I am meeting this problem too with Umbraco 7.3.1.

    2016-08-23 12:53:10,743 [P6932/D2/T72] INFO Umbraco.Core.Persistence.UmbracoDatabase - 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.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClass1.<ExecuteNonQueryWithRetry>b__0() at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func1 func) at Umbraco.Core.Persistence.Database.Update(String tableName, String primaryKeyName, Object poco, Object primaryKeyValue, IEnumerable1 columns) 2016-08-23 12:53:10,754 [P6932/D2/T72] ERROR Umbraco.Web.Strategies.ServerRegistrationEventHandler - Failed to update server record in database. System.Data.SqlClient.SqlException (0x80131904): Transaction (Process ID 152) 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.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>cDisplayClass1.0() at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func1 func) at Umbraco.Core.Persistence.Database.Update(String tableName, String primaryKeyName, Object poco, Object primaryKeyValue, IEnumerable1 columns) at Umbraco.Core.Persistence.Database.Update(Object poco, Object primaryKeyValue, IEnumerable1 columns) at Umbraco.Core.Persistence.Repositories.ServerRegistrationRepository.PersistUpdatedItem(IServerRegistration entity) at Umbraco.Core.Persistence.Repositories.RepositoryBase2.PersistUpdatedItem(IEntity entity) at Umbraco.Core.Persistence.UnitOfWork.PetaPocoUnitOfWork.Commit(Action1 transactionCompleting) 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)

    Do you have any workaround solution to overcome this ?

    Regards

  • Gordon 15 posts 96 karma points
    Aug 23, 2016 @ 13:39
    Gordon
    0

    Hi

    I've not found a solution to this, despite a lot of digging about... If you ever find anything do let us know. I don't know if newer versions of Umbraco have addressed this problem or not - is this issue being ignored by the Umbraco team?

    Thanks

  • Bach Huong 6 posts 98 karma points
    Aug 23, 2016 @ 13:48
    Bach Huong
    0

    Thank you for your prompt response. I keep investigating deeply about this.

  • james 5 posts 75 karma points
    Oct 08, 2017 @ 21:22
    james
    0

    Has this ever been resolved?

    I've upgraded to 776 and am now getting the same issue. Site has been running for a year on Azure. Now with the upgrade we are receiving deadlock info in the admin panel.

    Umbraco.Web.Strategies.ServerRegistrationEventHandler - Failed to update server record in database.

    2017-10-08 02:35:45,558 [P4920/D2/T24] ERROR Umbraco.Web.Strategies.ServerRegistrationEventHandler - Failed to update server record in database. System.Data.SqlServerCe.SqlCeException (0x80004005): There is a file sharing violation. A different process might be using the file. [ D:\home\site\wwwroot\AppData\Umbraco.sdf ] at System.Data.SqlServerCe.SqlCeConnection.Open(Boolean silent) at System.Data.SqlServerCe.SqlCeConnection.Open() at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.<>cDisplayClass200.

  • Luka 5 posts 74 karma points c-trib
    Oct 09, 2017 @ 12:43
    Luka
    0

    Also here after upgrade to 7.7 errors like these appear in the log

    2017-10-09 14:04:13,042 [P280036/D2/T1043] ERROR Umbraco.Core.Persistence.UmbracoDatabase - Exception (9432cba7). System.Data.SqlClient.SqlException (0x80131904): Transaction (Process ID 69) 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:9e282a5f-5111-418e-908a-0d3884cecb7f Error Number:1205,State:51,Class:13

    2017-10-09 14:04:13,089 [P280036/D2/T1043] ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.InvalidOperationException: This SqlTransaction has completed; it is no longer usable. at System.Data.SqlClient.SqlTransaction.ZombieCheck() at System.Data.SqlClient.SqlTransaction.Commit() at Umbraco.Core.Persistence.Database.CleanupTransaction() at Umbraco.Core.Persistence.Database.CompleteTransaction() at Umbraco.Core.Scoping.Scope.DisposeLastScope() at Umbraco.Core.Scoping.Scope.Dispose() at Umbraco.Core.Persistence.UnitOfWork.ScopeUnitOfWork.DisposeResources() at Umbraco.Core.DisposableObject.Dispose(Boolean disposing) at Umbraco.Core.DisposableObject.Dispose() at Umbraco.Core.Services.ContentService.GetDescendants(IContent content) at *.Page_Load(Object sender, EventArgs e) in **:line 82 at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Please Sign in or register to post replies

Write your reply to:

Draft