'A connection attempt failed because the connected party did not properly respond after a period of time in Azure
I have a Azure VM on which a Windows service is installed.
In this Windows service, we are registering to the EventHub like mentioned in this website.
I have method which logs error like this:
Task IEventProcessor.ProcessErrorAsync(PartitionContext context, Exception error)
{
log.Error($"Error: {error.Message}");
return Task.CompletedTask;
}
This Windows service keeps listening to the event hub and whenever a event is received, it performs some processing based on the event (some business logic). When the processing is happening, it sometimes throws this error in between.
Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
But there after some time, it resumes its processing as usual. So why do these error messages come and is it getting resolved by itself. This is not causing any issue for me but want to know the reason and want to avoid this in future completely if possible. I have searched a lot about this on net, couldn't find any proper solution.
Solution 1:[1]
Adding to @ItayPodhajcer's answer.
Add a Retry Policy. It is very common to have transient connection errors in a cloud based services. Refer to the Service Bus Retry policy document here:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Sunny Sharma |
