|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
onâ€_statementhappening every few days in a distributed application. Here is the code: Dim connection As SqlClient.SqlConnection = SqlHelper.GetConnection(ConnectionString) Try Dim trans As SqlClient.SqlTransaction = connection.BeginTransaction '<--Timeout on this line! .... TRACE: 10/8/2006 1:40:34 PM|SNSBatch:.Net SqlClient Data Provider|System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, TdsParserState state) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, TdsParserState state) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() at System.Data.SqlClient.TdsParser.ReadNetlib(Int32 bytesExpected) at System.Data.SqlClient.TdsParser.ReadBuffer() at System.Data.SqlClient.TdsParser.ReadByte() at System.Data.SqlClient.TdsParser.Run(RunBehavior run, SqlCommand cmdHandler, SqlDataReader dataStream) at System.Data.SqlClient.SqlInternalConnection.ExecuteTransaction(String sqlBatch, String method) at System.Data.SqlClient.SqlConnection.BeginTransaction(IsolationLevel iso) at System.Data.SqlClient.SqlConnection.BeginTransaction() at SNS.SNSTicket.Commit(Guid appID) in C:\SNS LIVE\Core\SNS\SNSTicket.vb:line 322 Anyone seen this behavior before? Suggestions, comments, fixes? Thank you, Tyron Millwee Is your connection open?
Show quote "Tyron Millwee" <Tyron Mill***@discussions.microsoft.com> wrote in message news:1C9ABA39-5D8B-48B5-926F-A69D163077D7@microsoft.com... > SQL is timing out on a "BeginTransaction" statement. This error is only > happening every few days in a distributed application. > > Here is the code: > > Dim connection As SqlClient.SqlConnection = > SqlHelper.GetConnection(ConnectionString) > Try > Dim trans As SqlClient.SqlTransaction = connection.BeginTransaction > '<--Timeout on this line! > ... > > > TRACE: > > 10/8/2006 1:40:34 PM|SNSBatch:.Net SqlClient Data > Provider|System.Data.SqlClient.SqlException: Timeout expired. The timeout > period elapsed prior to completion of the operation or the server is not > responding. > at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, > TdsParserState state) > at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException > exception, TdsParserState state) > at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() > at System.Data.SqlClient.TdsParser.ReadNetlib(Int32 bytesExpected) > at System.Data.SqlClient.TdsParser.ReadBuffer() > at System.Data.SqlClient.TdsParser.ReadByte() > at System.Data.SqlClient.TdsParser.Run(RunBehavior run, SqlCommand > cmdHandler, SqlDataReader dataStream) > at System.Data.SqlClient.SqlInternalConnection.ExecuteTransaction(String > sqlBatch, String method) > at System.Data.SqlClient.SqlConnection.BeginTransaction(IsolationLevel > iso) > at System.Data.SqlClient.SqlConnection.BeginTransaction() > at SNS.SNSTicket.Commit(Guid appID) in C:\SNS > LIVE\Core\SNS\SNSTicket.vb:line 322 > > Anyone seen this behavior before? Suggestions, comments, fixes? > > Thank you, > Tyron Millwee Yes the connection should be open at this point. In this example
"SqlHelper.GetConnection(ConnectionString)" returns an opened SqlClient.SqlConnection Public Shared Function GetConnection(ByVal ConnectionString As String) As SqlClient.SqlConnection Try Dim cnnSQL As New SqlClient.SqlConnection(ConnectionString) If cnnSQL.State = ConnectionState.Closed Then cnnSQL.Open() End If Return cnnSQL Catch Err.Raise(Err.Number, Err.Source, "GetConnection: " & Err.Description) End Try End Function Show quote "W.G. Ryan [MVP]" wrote: > Is your connection open? > "Tyron Millwee" <Tyron Mill***@discussions.microsoft.com> wrote in message > news:1C9ABA39-5D8B-48B5-926F-A69D163077D7@microsoft.com... > > SQL is timing out on a "BeginTransaction" statement. This error is only > > happening every few days in a distributed application. > > > > Here is the code: > > > > Dim connection As SqlClient.SqlConnection = > > SqlHelper.GetConnection(ConnectionString) > > Try > > Dim trans As SqlClient.SqlTransaction = connection.BeginTransaction > > '<--Timeout on this line! > > ... > > > > > > TRACE: > > > > 10/8/2006 1:40:34 PM|SNSBatch:.Net SqlClient Data > > Provider|System.Data.SqlClient.SqlException: Timeout expired. The timeout > > period elapsed prior to completion of the operation or the server is not > > responding. > > at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, > > TdsParserState state) > > at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException > > exception, TdsParserState state) > > at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() > > at System.Data.SqlClient.TdsParser.ReadNetlib(Int32 bytesExpected) > > at System.Data.SqlClient.TdsParser.ReadBuffer() > > at System.Data.SqlClient.TdsParser.ReadByte() > > at System.Data.SqlClient.TdsParser.Run(RunBehavior run, SqlCommand > > cmdHandler, SqlDataReader dataStream) > > at System.Data.SqlClient.SqlInternalConnection.ExecuteTransaction(String > > sqlBatch, String method) > > at System.Data.SqlClient.SqlConnection.BeginTransaction(IsolationLevel > > iso) > > at System.Data.SqlClient.SqlConnection.BeginTransaction() > > at SNS.SNSTicket.Commit(Guid appID) in C:\SNS > > LIVE\Core\SNS\SNSTicket.vb:line 322 > > > > Anyone seen this behavior before? Suggestions, comments, fixes? > > > > Thank you, > > Tyron Millwee > > > |
|||||||||||||||||||||||