Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a production database server (Windows Server 2008 / SQL Server 2008) which has a .NET CLR Assembly referenced on it with a CLR function called dbo.fnu_RequestUrl.

The purpose of this function is to simply take in a URL and return the corresponding HTTP response. This function has been working, completely without issue, for over a year in production now, used for exactly the same purpose that is now having issues. This function uses the standard System.Net.HttpWebRequest / System.Net.WebResponse.

Anyway, for roughly 3 hours last night, this function started exhibiting odd behavior:

SELECT dbo.fnu_RequestUrl('http://google.com') -- proper response
SELECT dbo.fnu_RequestUrl('http://jsonip.com') -- proper response
SELECT dbo.fnu_RequestUrl('http://www.mywebsite.com') -- proper response
SELECT dbo.fnu_RequestUrl('http://mywebsite.com') -- timeout

In this case, pages on 'mywebsite.com' is what this function is usually used to retrieve. going to the 'www.mywebsite.com' version will point to the exact same server / IP address and return the exact same content (let's forget for now why that is an issue).

Anyway, during these three hours, this behavior as described above was consistent, and then suddenly went away.

This morning, the same issue started again for roughly 2 minutes, and then suddenly went away.

The following details are also true, which make this even more confusing to me:

  1. logging onto the DB server and browsing to mywebsite.com in the web browser worked without issue.
  2. the site was up and running fine. No drops in traffic or anything like that.
  3. both the DB server and the web server had no errors in the windows event logs during this time
  4. as far as we know, absolutely no changes were made to this production environment to instigate the issue
  5. during this time, both servers were under normal load

Network setup:

Both of the servers are behind the same firewall. The web server sits behind a load balancer. The load balancer's IP is what 'mywebsite.com' and 'www.mywebsite.com' resolve to. No changes were made to the firewall and/or the load balancer configuration any time recently.

One potential link

One (possibly coincidental) lead was discovered. On the web server, the following error was logged right before the issue occurred both times:

System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: 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 {{Ip Address}}: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) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.GetResponse()

Although I have a feeling this isn't coincidental, it's probably important to know that this error occured while performing an OAuth web request to a 3rd party server, not any server of our own.

Please let me know if there is any additional information I can provide. I appreciate any help whatsoever.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.