Configuring xConnect Client API timeouts
You can set a default timeout when you instantiate the xConnect Client API or you can set a timeout for a particular request.
You can also configure timeouts at a storage provider level.
Set the default client timeout in a non-Sitecore context
Set the default client timeout in a non-Sitecore context
In a non-Sitecore context, default client timeout can be set by passing in a TimeoutHttpClientModifier. In the following example, a timeout modifier is added to the search, collection, and configuration clients before the configuration is initialized:
If you do not specify a client timeout, the default client timeout is 100 seconds.
Set the default client timeout in a Sitecore context
Set the default client timeout in a Sitecore context
There is no default client timeout for the xConnect Client API in a Sitecore context. This is because different features within the platform have different timeout requirements. For example, the tracker must time out quickly if a contact is not available whereas the List Manager must allow time for large batches to be processed.
Specify a timeout per request
Specify a timeout per request
You can specify a timeout per request by passing in a cancellation token. All extension methods on the client have an overload that accepts a cancellation token:
If you are using the synchronous extension methods, you can pass in a TimeSpan.