我々はthis StackOverflow Qと同じエラーが発生している...SQL Serverの「ネットワーク関連またはインスタンス固有のエラー」一日に一回かそこら(困惑!)
System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - 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.)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Linq.SqlClient.SqlConnectionManager.UseConnection(IConnectionUser user)
at System.Data.Linq.SqlClient.SqlProvider.get_IsSqlCe()
at System.Data.Linq.SqlClient.SqlProvider.InitializeProviderMode()
at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
...エラーが発生したら、SQL Serverを再起動する必要があります - そうしないでください。このエラーは、1日に1回、または数日に1回発生します。エラーが発生してから次回発生するまでは問題ありません。
これは「接続を閉じるのを忘れた」問題ではないと考えています。私たちは適度に忙しいASP.NET 4.0 WebForms/SQL Server 2008 R2アプリケーションを持っています。しかし、データベース接続の最大数を超えていないということは非常に肯定的です。
この問題に関するすべての考え、または診断する方法はありますか?
接続をプールしていますか? –
私たちはプーリング設定を指定しません - すべてのデフォルトを適用させるだけです。データソース= xxx \ sql2008,40000;ネットワークライブラリ= DBMSSOCN;初期カタログ= yyy; MultipleActiveResultSets = True;セキュリティ情報を保持する= True;接続タイムアウト= 60 –