/
Publish fails with deadlock

Publish fails with deadlock

Problem

Publish fails due to publish failing with a deadlock message.

 

Error message in log file looks similar to the below.

Remote publish failed Failed to generate new site Failed to copy database Remove not permitted references Failure to ExecuteNonQueryAsync: delete from [SiteDatabase].[dbo].[ReferenceIdentities] where ReferenceId in (23610577,23610578,23610579,23610580,23610581,23610582,23610583,23610584,23610585,23610586 …);
delete from [SiteDatabase].[dbo].[References] where Id in (23610577,23610578,23610579,23610580,23610581,23610582,23610583,23610584,23610585,23610586 …)
One or more errors occurred.
Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

Solution

The error message is an indication of low resources at publish and reducing the load on the server during publish may resolve the problem. The risk of getting this problem is higher with a small server setup, older versions of Windows Server and SQL versions prior to SQL 2019.

Publishing process runs in multiple processes and default is 5 parallel threads. This is configured in server.config located in C:\ProgramData\Signifikant\Assert

 

<MaxParallelPublisherThread>5</MaxParallelPublisherThread>

 

Reducing max parallel threads may resolve the issue. Time to publish may increase due to this action.

Related articles

Related content

Publish fails with interruption
Publish fails with interruption
More like this
Publish fails with out of memory exception
Publish fails with out of memory exception
More like this
Publish fails with 500 internal server error
Publish fails with 500 internal server error
More like this
Publish fails with validation error
Publish fails with validation error
More like this
Technical documentation - Publish performance settings
Technical documentation - Publish performance settings
More like this
Publish fails with error looping replacement
Publish fails with error looping replacement
More like this