1
votes

I have Created a webjob to crawl my website on Azure which runs in every 10 seconds, the webjob is working fine few months before but now randomly i am getting the below error

System.Net.Sockets.SocketException (0x80004005): 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 81.218.113.171:443 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)

I have tried to google it and tried many methods to set on WebRequest as stated below

WebRequest.proxy = null;
WebRequest.KeepAlive = false;
WebRequest.ProtocolVersion = HttpVersion.Version10;
WebRequest.ServicePoint.ConnectionLimit = 12;

As I am saying the error comes randomly, On crawling 5 to 6 times it comes for once.

1
Hi. Did you ever find the cause of this? I've just started having the same issue.DaveU

1 Answers

2
votes

How many instances of your web site are running? It's possible there are (say) 6 instances running, where 5 of them are OK, but the last has stopped running. The load-balancer doesn't realise the instance is down and is still pushing requests to the 'broken' instance.