Configure the exponential backoff retry strategy
The xConnect retryer uses the exponential backoff retry strategy by default. You can change the exponential backoff retry configuration by updating the configuration file.
To change the configuration on a Sitecore CMS role:
-
Open the
C:\path\to\sitecore\App_Config\Sitecore\XConnect.Client.Configuration\Sitecore.XConnect.Client.configfile.NoteIn a non-Sitecore context, open the
sc.xConnect.Client.xmlconfiguration file. -
In the configuration file, locate the
<ExponentialRetry>section, and set the following settings to the value of your choice:Setting
Description
MaxAttemptsSpecifies the maximum number of retry attempts for transient faults. When this amount is reached, the retryer defines the target service as unavailable.
MinBackoffThe minimum time period between retry attempts.
MaxBackoffThe maximum time period between retry attempts.
DeltaBackoffThe number of seconds between retries (the length of back-off time).
The following shows an example of the default retryers configuration that the xConnect Collection and xConnect Search services uses for the Content Management role:
RequestResponse<!-- Collection and Search XConnect Client configuration for ContentManagement role --> <clientconfig type="Sitecore.XConnect.Client.Configuration.SitecoreXConnectClientConfiguration,Sitecore.XConnect.Client.Configuration" singleInstance="true" role:require="ContentManagement"> <param desc="clientModel" ref="xconnect/runtime" /> <param desc="collectionConnectionStringName">xconnect.collection</param> <param desc="searchConnectionStringName">xconnect.search</param> <param desc="configurationConnectionStringName">xconnect.collection</param> <param desc="CircuitBreakerFactory" ref="xconnect/CircuitBreakersConfiguration"/> <param desc="retryerRegistry" type="Sitecore.Framework.TransientFaultHandling.IRetryerRegistry,Sitecore.Framework.TransientFaultHandling.Abstractions" resolve="true"/> <param desc="retryerName">Sitecore.XConnect.Client.Retryer</param> </clientconfig> … <TransientFaultHandling> <Retryers> <Sitecore.XConnect.Client.Retryer> <Type>Sitecore.Xdb.Common.HttpTransientFaultHandling.DefaultHttpPolicyRetryerFactory, Sitecore.Xdb.Common.HttpTransientFaultHandling</Type> <Options> <ExponentialRetry> <MaxAttempts>10</MaxAttempts> <MinBackoff>00:00:01</MinBackoff> <MaxBackoff>00:00:30</MaxBackoff> <DeltaBackoff>00:00:10</DeltaBackoff> </ExponentialRetry <CustomCodes> </CustomCodes> </Options> </Sitecore.XConnect.Client.Retryer> </Retryers> </TransientFaultHandling>
In the example, the <CustomCodes> section is empty. If the retryer configuration does not specify error respond codes, the retryer uses the default codes.