10 February 2011

SqlClient – Connection Delay/Timeouts

Recently we were faced with a problem where connections to SQL Server (using ADO.NET System.Data.SqlClient) from a web server were taking just too long or were timing out.

It turned out that although the SQL Server was listening on all 3 protocols (shared memory, TCP, named pipes), there was a firewall between the web and SQL server and the default TCP port 1433 was not open.

Looks like the SqlClient tries all the protocols - shared memory, TCP, named pipes - in that order till it finds a valid protocol. Since namedpipes was the only valid protocol, the connection was taking long/timing out, since all other protocols had to fail before it attempted to use namedpipes.

Here is a blog post which discusses this behaviour - http://blogs.msdn.com/b/adonet/archive/2010/04/18/sqlclient-default-protocol-order.aspx

On the web server, we created an alias for the server and configured the alias to use the named pipes protocol. We also disabled all the other protocols in the SQL Client Configuration. This seemingly solved the problem.

Here are a few more good reads on the issue:

3 comments:

  1. Casino Game For Sale by Hoyle - Filmfile Europe
    › casino-games › casino-games › casino-games › https://deccasino.com/review/merit-casino/ casino-games Casino https://vannienailor4166blog.blogspot.com/ Game for sale by wooricasinos.info Hoyle on Filmfile Europe. Free septcasino shipping for most countries, no download nba매니아 required. Check the deals we have.

    ReplyDelete
  2. The King Casino and Resort
    The king casino and resort features apr casino a modern casino with ventureberg.com/ everything you'd expect from a classic Vegas Strip herzamanindir.com/ casino. 바카라사이트 The resort features 50000 square feet of Funding: $250 millionDesign: https://vannienailor4166blog.blogspot.com/ Inspired DesignMasters: Ivan Karaszko

    ReplyDelete
  3. Of course, you can to|you presumably can} place a chip on the zero and back it at 35/1. But the important thing} thing is that if zero obtainable in}, then everyone who wager on another quantity, red or black, or odd and even, loses their cash. While that’s all properly and good, and relatively straightforward for a casino newcomer to grasp, the variations of the roulette table layout want explaining. Upon gaining entry, they found a secret door which opened electronically by a push button beneath the carpet hiding roulette tables and other gambling equipment. We went around the roulette tables to find a trend, which we'd wager in opposition to. After 온라인카지노 being ushered to the roulette table, she performs and wins a major amount of cash.

    ReplyDelete