Re: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
- From: "William Vaughn" <billvaNoSPAM@xxxxxxxxx>
- Date: Wed, 31 Oct 2007 09:41:49 -0700
This could be caused by a transient deadly embrace or other locking issue. It might also be caused by someone using Reporting Services on the same system, or another service that hogs disk IO channels or consumes more than its share of CPU time. It could be something as simple as SQL Server building a new extent as new data pages are added.
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------
"Rick" <rfemmer@xxxxxxxxxxxxxxxxx> wrote in message news:%23Yt2HQxGIHA.6044@xxxxxxxxxxxxxxxxxxxxxxx
The command timeout is set to 120 and the connection timeout is 500, the command is executing a stored proc that inserts 1 record. The stored proc works as expected, it will return 'SUCCESS' on insert or the error message from the stored proc if it failed. As I said, It only happens randomly. And it happens on the _cn.open
Private _cn As System.Data.SqlClient.SqlConnection
_cn = New SqlConnection(connectionstring here)
strSQL.Append("EXEC usp_InsertTblLookupDataReference ")
strSQL.Append(PARAMETERS HERE)
If Not _cn.State = ConnectionState.Open Then
_cn.Open()
End If
Dim returnValue As String = ""
countParam = New SqlClient.SqlParameter("@insertSuccess", SqlDbType.NVarChar, 4000)
localSQL = New System.Data.SqlClient.SqlCommand(strSQL.ToString, _cn)
localSQL.CommandTimeout = 120
countParam.Direction = ParameterDirection.Output
localSQL.Parameters.Add(countParam)
localSQL.ExecuteNonQuery()
returnValue = localSQL.Parameters("@insertSuccess").Value.ToString
If returnValue.ToUpper <> "SUCCESS" Then
Throw New Exception("Error Inserting TblLookupDataReference record:" & returnValue & " - " & strSQL.ToString)
End If
If _cn.State = ConnectionState.Open Then
_cn.Close()
End If
"WenYuan Wang [MSFT]" <v-wywang@xxxxxxxxxxxxxxxxxxxx> wrote in message news:Z7kZ2QuGIHA.5176@xxxxxxxxxxxxxxxxxxxxxxxxxHello Rick,
Thanks for Norman's suggestion.
I noticed the exception was raised by SqlCommand.ExecuteNonQuery() method.
Stack Trace:
..
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
Have you tried increasing the SqlCommand.Timeout property?
The default value of SqlCommand is 30 (30 seconds).
It seems this process need much more time to run. Maybe you should increase
the timeout of this command.
Hope this helps.
Best regards,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- References:
- Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
- From: Rick
- RE: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
- From: WenYuan Wang [MSFT]
- Re: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
- From: Rick
- Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
- Prev by Date: Re: Elementary question on connection string
- Previous by thread: Re: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
- Next by thread: I set my database to trustworthy and deployed this clr stored proc as unsafe ok but when i run this it returns 1 each time. as if ival keeps getting set back to 0 each time i call this clr stored proc. How to fix so that ival keeps its current value each t
- Index(es):
Relevant Pages
|
Loading