Telemetry tracking affects an application performance


Description

A request execution as well as some background tasks might get significantly slower when using Sitecore XP 10.1.0 or 10.1.1. Having xDB and xDB.Tracking enabled makes the issue more pronounced.

The issue can be identified by a high number of System.TypeLoadException exceptions for System.Security.Cryptography.ECParameters type when profiling the application.

For more details about the root cause of the issue, see here.

Solution

To resolve the issue, consider the following solution. We recommend that you apply the solution to all environments that run Sitecore 10.1.0 or 10.1.1 (both XM and XP topology):

  1. Open the web.config file.
  2. Find and comment out binding redirects for "System.Security.Cryptography.Algorithms". For example:
    <!--
    <dependentAssembly>
      <assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a" />
      <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
    </dependentAssembly>
    -->