I'm investigating an issue where we are seeing SocketExceptions and socket handle leaks. Using Sitecore 8.2 rev 107614, in Azure using Azure Search as the search provider.
Drilling down to one of the exceptions, I see the message
An unhandled exception occurred. Error while rendering view: '/Views/Layouts/Layout.cshtml' (model: 'Sitecore.Mvc.Presentation.RenderingModel, Sitecore.Mvc'). An unhandled exception occurred. An unhandled exception occurred. An error occurred while sending the request. Unable to connect to the remote server An attempt was made to access a socket in a way forbidden by its access permissions
The exception type is
and the Failed method is
So I'm wondering if this is related to how the search service client is configured as I see there are some re-tryer configuration settings (left at default, I believe)
<searchServiceClient type="Sitecore.ContentSearch.Azure.Http.SearchServiceClient, Sitecore.ContentSearch.Azure"> <param ref="contentSearch/httpClientFactory" desc="clientFactory"/> <param type="Sitecore.ContentSearch.Azure.Http.CloudSearchRetryPolicy, Sitecore.ContentSearch.Azure" desc="retryPolicy"> <DetectionStrategy type="Sitecore.ContentSearch.Azure.Http.CloudSearchTransientDetectionStrategy, Sitecore.ContentSearch.Azure"/> <RetryStrategy type="Sitecore.ContentSearch.Azure.Http.CloudSearchExponentialRetryStrategy, Sitecore.ContentSearch.Azure"> <Exponent>1.5</Exponent> <MaxRetryCount>10</MaxRetryCount> <MinDelayInterval>00:00:00.5</MinDelayInterval> <MaxDelayInterval>00:00:10</MaxDelayInterval> </RetryStrategy> </param> <managementOperationsTimeout>00:01:00</managementOperationsTimeout> </searchServiceClient>
When does the "re-tryer" come into play, could be it during unavailability of the search service?
Is there any documentation about the re-tryer, or does someone know how I might modify these settings to avoid the SocketException issue I am seeing? (I can guess what
MaxDelayInterval do, but not sure what the
Exponent property is for?).