July 18, 2008 at 6:01 am
Hello Guys,
We are experiencing following SQL error frequently on production server 2000 but we are unable to reproduce it on testing server.
"Timeout expired. The timeout period elapsed prior to
completion of the operation or the server is not responding."
0 " .Net SQL Client Data Provider ConnectionRead (WrapperRead())."
As there are no additional information in the Errors collection, we are stuck here what will be the probable reasons for occurrence of error. We have searched on net also but not found any satisfactory reasons.
Pls help us by providing probable solutions to this problem.
Thanks in advance.
July 18, 2008 at 7:06 am
Here is a link. May it help.
http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework.adonet/topic11857.aspx
July 18, 2008 at 7:14 am
Whatever query you called ran longer than 30 sec (or whatever the timeout is set to)
To fix, you are going to have to identify what query is been called and then ither optimise the query, or increase the connection timeout set in .net.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 20, 2008 at 10:30 pm
Query and connection string might not be the problem....because the same code is share between lots of application on another servers and working filne even for larger databases.
July 20, 2008 at 11:00 pm
You need to increase the CommandTimeout of the connection object in your .NET code. The default values is 30 seconds.
You can increase it up to 3600 seconds (1 hour)
You can use it as follows:
SqlCommand cmd = new SqlCommand();
cmd.CommandTimeout = 3600;
-----------------------------------------------------------[font=Arial Black]Time Is Money[/font][font=Arial Narrow]Calculating the Number of Business Hours Passed since a Point of Time[/url][/font][font=Arial Narrow]Calculating the Number of Business Hours Passed Between Two Points of Time[/font]
July 20, 2008 at 11:05 pm
I have already set it 0 (i.e unlimited)....
November 4, 2008 at 4:20 pm
Did that problem got resolved by setting timeout to 0(unlimited)?
Sorry asking quiet late.
MJ
November 4, 2008 at 9:02 pm
This problem is not resolved yet..
November 5, 2008 at 7:16 am
Did you try setting timeout setting to 1 hour or something apart from 0(i.e. unlimited) as it usually allows the code to give an hung impression to server.
MJ
November 5, 2008 at 9:14 pm
Yes i had tried this,May be this is a problem of sql server 2000.
November 5, 2008 at 9:32 pm
anurag.sharma (7/20/2008)
Query and connection string might not be the problem....because the same code is share between lots of application on another servers and working filne even for larger databases.
are the same database [table(s)] is sharing by multiple applications ???
kshitij kumar
kshitij@krayknot.com
www.krayknot.com
November 5, 2008 at 9:43 pm
No this server is shared by single apllication but on multiuser enviorment, The problem is only with one server. And same code running on different servers are working fine. Might be this is a problem of sql server's dll.
November 6, 2008 at 7:27 am
Have you tried running the t-sql statament ran by the code on server itself? It will answer your problem whether its timeout settings on >net side that needs to be changed or is it something that is faulty on sql server side.
MJ
February 6, 2009 at 5:56 am
query is executing fine on the server, But frequently "TimeOut Expire Bug" is comming.
May 9, 2009 at 3:35 am
Not Found the solution of this problem yet , Followind code is used
Public Function fExecuteQueryForDataTable(ByVal sSql As String, ByRef objDataTable As Object) As Boolean
Dim objConnection As SqlConnection
Dim objDataAdapter As SqlClient.SqlDataAdapter
Try
If Not (gstrDBType = "ORACLE" Or gstrDBType = "SQL") Then
gstrErrorDesc = "This Application Supports ORACLE And SQL."
Exit Function
End If
objConnection = New SqlClient.SqlConnection(gstrADONETConnString)
objConnection.Open()
If objConnection.State ConnectionState.Open Then
gstrErrorDesc = LoadResString(2032)
Exit Function
End If
objDataAdapter = New SqlDataAdapter(sSql, objConnection)
objDataAdapter.SelectCommand.CommandTimeout = 0
objDataTable = New DataTable
objDataAdapter.Fill(objDataTable)
fExecuteQueryForDataTable = True
Catch ex As Exception
gstrErrorDesc = ex.Message
fExecuteQueryForDataTable = False
Finally
If objConnection.State ConnectionState.Closed Then
If Not IsNothing(objDataAdapter) Then
objDataAdapter.Dispose()
End If
objConnection.Close()
objConnection.Dispose()
End If
objDataAdapter = Nothing
objConnection = Nothing
End Try
End Function
Viewing 15 posts - 1 through 14 (of 14 total)
You must be logged in to reply to this topic. Login to reply