Issues with deadlocks when using the TryPublish in multiple threads simultaneously

Is anyone also having issues with deadlocks when publising multiple pages in thread simultaneously? I'm getting the following error:

CMS.EventLog.EventLogService[0]
Exception occured for object with ID: 19 of type: 9237e512-2430-436f-a06a-e31488aa7cec
Microsoft.Data.SqlClient.SqlException (0x80131904): Transaction (Process ID 59) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)
at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose)
at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at Microsoft.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows)
at Microsoft.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more)
at Microsoft.Data.SqlClient.SqlDataReader.Read()
at CMS.DataEngine.Internal.ExtendedDbDataReader.Read()
at CMS.DataEngine.DataQueryBase1.GetEnumerableResult(CommandBehavior commandBehavior, Boolean newConnection)+MoveNext() at CMS.DataEngine.DataExtensions.As[InfoType](IEnumerable1 dataRecords, Func2 createObjectFunc) at CMS.DataEngine.ObjectDependenciesRemover.GetDependencyData(RemoveDependencyWithApiSettings removeSettings, BaseInfo obj) at CMS.DataEngine.ObjectDependenciesRemover.RemoveDependencyUsingAPI(String objectType, RemoveDependencyWithApiSettings removeSettings) at CMS.DataEngine.ObjectDependenciesRemover.RemoveObjectDependenciesByAPI(IEnumerable1 queries)
at CMS.DataEngine.ObjectDependenciesRemover.RemoveObjectDependencies(ICollection1 dependencies, Boolean clearCache) at CMS.DataEngine.ObjectDependenciesRemover.RemoveObjectDependenciesAuto(BaseInfo infoObj, Boolean deleteAll, Boolean clearCache) at CMS.DataEngine.ObjectDependenciesRemover.RemoveObjectDependencies(BaseInfo infoObj, Boolean deleteAll, Boolean clearCache) at CMS.DataEngine.BaseInfo.RemoveObjectDependencies(Boolean deleteAll, Boolean clearCache) at CMS.DataEngine.AbstractInfoBase1.DeleteRelatedData()
at CMS.DataEngine.AbstractInfoBase1.DeleteDataSyncOrAsync(Boolean useAsync, CancellationToken cancellationToken) at CMS.DataEngine.AbstractInfoBase1.DeleteData()
at CMS.DataEngine.AbstractInfoBase1.GeneralizedInfoWrapper.DeleteData() at CMS.DataEngine.AbstractInfoProvider3.WithEvent[TBeforeEvent,TAfterEvent](Action action, IEnumerable1 beforeEventHandlers, TBeforeEvent beforeEvent, IEnumerable1 afterEventHandlers, Func1 afterEventFactory) at CMS.DataEngine.AbstractInfoProvider3.<>c__DisplayClass100_0.````b__0()
at CMS.DataEngine.SyncOrAsyncInvoker.InvokeSyncOrAsync(Boolean useAsync, Action syncAction, Func1 asyncAction) at CMS.DataEngine.AbstractInfoProvider3.DeleteInfoSyncOrAsync(Boolean useAsync, TInfo info, CancellationToken cancellationToken)
at CMS.DataEngine.AbstractInfoProvider3.DeleteInfo(TInfo info) at CMS.DataEngine.AbstractInfoProvider2.Delete(TInfo info)
at CMS.ContentEngine.Internal.ContentItemCommonDataInfo.DeleteObject()
at CMS.DataEngine.BaseInfo.Delete()
at CMS.ContentEngine.Core.ContentItemManagerCore.TryPublish(Int32 contentItemId, Int32 contentLanguageId, AfterPublishContentItemEventInitializer afterEventHandlerInitializer, CancellationToken cancellationToken)
at CMS.ContentEngine.ContentItemManager.TryPublish(Int32 contentItemId, String languageName, CancellationToken cancellationToken)

0

Answers

Can you please share the block of code that is involved and also your current version of xperience?

0

To response this discussion, you have to login first.