Deadlock occurring between bts_InsertTrackingData and TDDS_GetTrackingRecord

Recently, I saw an issue where we were observing deadlocks between the stored procedures 'bts_InsertTrackingData' and 'TDDS_GetTrackingRecord' and this happens when there is a huge load for BizTalk to process.

What we found that Tracking was enabled on multiple hosts. We disabled tracking on hosts such that we have only one tracking host and this resolved our issue. Pretty easy...This is what we always suggest to our customer to have a dedicated tracking host on production systems and especially where we expect high load as there it is expected that lot of tracking data will be generated. Using a dedicated tracking host also allows you to stop other BizTalk hosts without interfering with BizTalk Server tracking.

Configuring a Dedicated Tracking Host: https://msdn.microsoft.com/en-us/library/cc296633.aspx

Also, by default, track events (like Orchestration start and end, Shape start and end) are enabled for Orchestration. We would recommend to disable these events especially the Shape start and end in Production. Mostly we require these data in development stage to troubleshoot Orchestration using Orchestration Debugger and not in production. You can disable it by going to Orchestration properties in BizTalk Admin Console.

Important : If you do not require tracking data at all, better to turn off Global Tracking.