Peterson's Ponderings

Technical findings, ideas, thoughts and news directly from me.
in

March 2007 - Posts

General advice on SQL Server General Network Errors

Arghh, what are these "General Network Error" messages?  You know the ones, that randomly with no apparent pattern or reason happen in an application and raise tension between your developer and networking groups on who is to blame?  Typically because it says 'network' in the message the developers toss it over the fence to the network guys to try to tackle, but they toss back because the network connectivity passes all of their secret tests and then the issue drags on endlessly.

Well, I just found a great blog entry from one of the SQL engineers that may be an answer for some people.  I recently ran into this issue myself when SQL 2005 server was under load on a Windows 2003 server it would generate errors with the generic "General Network Error" message or "server has timed out or is unavailable".  The errors were very sporatic and seemed unrelated to anything going on in the code or the server itself.  Since the applications were still running on the .NET 1.1 framework the details of the underlying protocol issue couldn't be seen in the exception stack (the SqlClient stack in .NET 2.0 has a more robust error messaging syntax that actually reports the underlying protocol message such as 'TCP socket was closed from the remote host') and the generic error messages were all we had to work with.  Implementing the suggested registry change virtually eliminated the problem.  Be sure to read the comments of the blog that correct the registry parameter name (SynAttackProtect) which was mis-typed in the blog entry.