|
|
|
start date: Thu, 5 Jul 2007 22:38:00 -0700,
posted on: microsoft.public.dotnet.framework.adonet
back
| Thread Index |
|
1
David Thielen am
|
|
2
(Steven Cheng[MSFT])
|
|
3
David Thielen am
|
|
4
(Steven Cheng[MSFT])
|
|
5
David Thielen am
|
|
6
David Thielen am
|
|
7
William \(Bill\) Vaughn
|
|
8
William \(Bill\) Vaughn
|
|
9
(Steven Cheng[MSFT])
|
|
10
David Thielen am
|
|
11
William \(Bill\) Vaughn
|
|
12
(Steven Cheng[MSFT])
|
Randomly get timeout on SqlClient hitting localhost
Hi;
I get this error randomly on both my home and work computer. I'm hitting Sql
Server 2000 dev version on localhost. This happens on both my home and work
computer.
Here's the exception:
System.Data.SqlClient.SqlException occurred
Message="Timeout expired. The timeout period elapsed prior to completion
of the operation or the server is not responding."
Source=".Net SqlClient Data Provider"
ErrorCode=-2146232060
Class=11
LineNumber=0
Number=-2
Procedure=""
Server="localhost"
State=0
StackTrace:
at System.Data.SqlClient.SqlConnection.OnError(SqlException
exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader
ds, RunBehavior runBehavior, String resetOptionsString)
at
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method,
DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
behavior, String method)
at
System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
at
net.windward.datasource.ado.AdoDataSource.executeQuery(IDbConnection conn,
String select) in
C:\src\kahuna\DotNetEngine\WindwardReports\net\windward\datasource\ado\AdoDataSource.jsl:line 1852
--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
Date:Thu, 5 Jul 2007 22:38:00 -0700
Author:
|
RE: Randomly get timeout on SqlClient hitting localhost
Hi Dave,
From your description, you're getting some timeout exception in your
application randomly, correct?
It seems your ADO.NET code will meet connection unusable condition
randomly. Have you checked the server-side to see whether there is anything
abnormal sometimes? Since the code works mostly and if the code logic is
not quite complex, I think client-side should be ok.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Date:Fri, 06 Jul 2007 11:57:48 GMT
Author:
|
RE: Randomly get timeout on SqlClient hitting localhost
That's what is so strange about this - it is all on one machine. And this is
not a web app, it a Forms app. So there isn't much to go wrong at the
communications layer.
The other thing I just realized - it times-out fast. In under a second. So
there is some reason that it decides it is a timeout other than taking a long
time trying to connect.
--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
"Steven Cheng[MSFT]" wrote:
> Hi Dave,
>
> From your description, you're getting some timeout exception in your
> application randomly, correct?
>
> It seems your ADO.NET code will meet connection unusable condition
> randomly. Have you checked the server-side to see whether there is anything
> abnormal sometimes? Since the code works mostly and if the code logic is
> not quite complex, I think client-side should be ok.
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
Date:Fri, 6 Jul 2007 07:06:05 -0700
Author:
|
RE: Randomly get timeout on SqlClient hitting localhost
Thanks for your reply Dave,
Since it is a client form application, I think the problem should not be
caused by performance stress. If possible, you can try connecting to
different database to see whether you'll encounter the same error.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Date:Tue, 10 Jul 2007 15:10:39 GMT
Author:
|
RE: Randomly get timeout on SqlClient hitting localhost
I do. I get this problem on both my work and home computer. In both cases
they are connecting to a local copy of Sql Server 2000 dev version.
--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
"Steven Cheng[MSFT]" wrote:
> Thanks for your reply Dave,
>
> Since it is a client form application, I think the problem should not be
> caused by performance stress. If possible, you can try connecting to
> different database to see whether you'll encounter the same error.
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
Date:Tue, 10 Jul 2007 08:24:05 -0700
Author:
|
Re: Randomly get timeout on SqlClient hitting localhost
I think (going on memory here) that it only happens when I am running under
the debugger. Could that cause some kind of lockout?
It happens fast. It's not that a couple of seconds goes by and then it
returns this error - it's in under a second. So I don't think it's a true
timeout.
Age of Empires - love that game. Haven't played in awhile though. Enemy
Nations rocks too.
--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
"William (Bill) Vaughn" wrote:
> Okay, the timeouts can occur on any system. There are (generally) two types
> of timeouts that occur : Connection timeouts and Command timeouts. The
> former can be caused by a connection pool issue or by the server (or system)
> being too busy to process the query. The latter can be caused by a lock
> conflict or (again) the server being too busy to complete the operation in
> time. Just because it's a client system does not mean that there aren't
> other competing applications fighting for CPU time--like Age Of Empires. ;)
>
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> 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)
> -----------------------------------------------------------------------------------------------------------------------
>
> "Steven Cheng[MSFT]" wrote in message
> news:41lr$RwwHHA.4484@TK2MSFTNGHUB02.phx.gbl...
> > Thanks for your reply Dave,
> >
> > Since it is a client form application, I think the problem should not be
> > caused by performance stress. If possible, you can try connecting to
> > different database to see whether you'll encounter the same error.
> >
> > Sincerely,
> >
> > Steven Cheng
> >
> > Microsoft MSDN Online Support Lead
> >
> >
> > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> >
>
>
>
Date:Tue, 10 Jul 2007 10:56:01 -0700
Author:
|
Re: Randomly get timeout on SqlClient hitting localhost
Ah, the SQL Server debugger STOPS the service when you hit the breakpoint...
;) Could that be an issue for other developers?
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
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)
-----------------------------------------------------------------------------------------------------------------------
"David Thielen" <thielen@nospam.nospam> wrote in message
news:ED1A6C22-3347-4F18-8DDB-E4E89CDB0296@microsoft.com...
>I think (going on memory here) that it only happens when I am running under
> the debugger. Could that cause some kind of lockout?
>
> It happens fast. It's not that a couple of seconds goes by and then it
> returns this error - it's in under a second. So I don't think it's a true
> timeout.
>
> Age of Empires - love that game. Haven't played in awhile though. Enemy
> Nations rocks too.
>
> --
> thanks - dave
> david_at_windward_dot_net
> http://www.windwardreports.com
>
> Cubicle Wars - http://www.windwardreports.com/film.htm
>
>
>
>
> "William (Bill) Vaughn" wrote:
>
>> Okay, the timeouts can occur on any system. There are (generally) two
>> types
>> of timeouts that occur : Connection timeouts and Command timeouts. The
>> former can be caused by a connection pool issue or by the server (or
>> system)
>> being too busy to process the query. The latter can be caused by a lock
>> conflict or (again) the server being too busy to complete the operation
>> in
>> time. Just because it's a client system does not mean that there aren't
>> other competing applications fighting for CPU time--like Age Of Empires.
>> ;)
>>
>> --
>> ____________________________________
>> William (Bill) Vaughn
>> Author, Mentor, Consultant
>> Microsoft MVP
>> INETA Speaker
>> www.betav.com/blog/billva
>> www.betav.com
>> 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)
>> -----------------------------------------------------------------------------------------------------------------------
>>
>> "Steven Cheng[MSFT]" wrote in message
>> news:41lr$RwwHHA.4484@TK2MSFTNGHUB02.phx.gbl...
>> > Thanks for your reply Dave,
>> >
>> > Since it is a client form application, I think the problem should not
>> > be
>> > caused by performance stress. If possible, you can try connecting to
>> > different database to see whether you'll encounter the same error.
>> >
>> > Sincerely,
>> >
>> > Steven Cheng
>> >
>> > Microsoft MSDN Online Support Lead
>> >
>> >
>> > This posting is provided "AS IS" with no warranties, and confers no
>> > rights.
>> >
>>
>>
>>
Date:Tue, 10 Jul 2007 11:47:28 -0700
Author:
|
Re: Randomly get timeout on SqlClient hitting localhost
Or is that the CLR debugger... ;(
CLR Debugger. Yes, but in debug mode you are interfering with the service
process... it could be the issue.
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
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)
-----------------------------------------------------------------------------------------------------------------------
"William (Bill) Vaughn" wrote in message
news:O54QVLywHHA.4800@TK2MSFTNGP05.phx.gbl...
> Ah, the SQL Server debugger STOPS the service when you hit the
> breakpoint... ;) Could that be an issue for other developers?
>
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> 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)
> -----------------------------------------------------------------------------------------------------------------------
>
> "David Thielen" <thielen@nospam.nospam> wrote in message
> news:ED1A6C22-3347-4F18-8DDB-E4E89CDB0296@microsoft.com...
>>I think (going on memory here) that it only happens when I am running
>>under
>> the debugger. Could that cause some kind of lockout?
>>
>> It happens fast. It's not that a couple of seconds goes by and then it
>> returns this error - it's in under a second. So I don't think it's a true
>> timeout.
>>
>> Age of Empires - love that game. Haven't played in awhile though. Enemy
>> Nations rocks too.
>>
>> --
>> thanks - dave
>> david_at_windward_dot_net
>> http://www.windwardreports.com
>>
>> Cubicle Wars - http://www.windwardreports.com/film.htm
>>
>>
>>
>>
>> "William (Bill) Vaughn" wrote:
>>
>>> Okay, the timeouts can occur on any system. There are (generally) two
>>> types
>>> of timeouts that occur : Connection timeouts and Command timeouts. The
>>> former can be caused by a connection pool issue or by the server (or
>>> system)
>>> being too busy to process the query. The latter can be caused by a lock
>>> conflict or (again) the server being too busy to complete the operation
>>> in
>>> time. Just because it's a client system does not mean that there aren't
>>> other competing applications fighting for CPU time--like Age Of Empires.
>>> ;)
>>>
>>> --
>>> ____________________________________
>>> William (Bill) Vaughn
>>> Author, Mentor, Consultant
>>> Microsoft MVP
>>> INETA Speaker
>>> www.betav.com/blog/billva
>>> www.betav.com
>>> 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)
>>> -----------------------------------------------------------------------------------------------------------------------
>>>
>>> "Steven Cheng[MSFT]" wrote in message
>>> news:41lr$RwwHHA.4484@TK2MSFTNGHUB02.phx.gbl...
>>> > Thanks for your reply Dave,
>>> >
>>> > Since it is a client form application, I think the problem should not
>>> > be
>>> > caused by performance stress. If possible, you can try connecting to
>>> > different database to see whether you'll encounter the same error.
>>> >
>>> > Sincerely,
>>> >
>>> > Steven Cheng
>>> >
>>> > Microsoft MSDN Online Support Lead
>>> >
>>> >
>>> > This posting is provided "AS IS" with no warranties, and confers no
>>> > rights.
>>> >
>>>
>>>
>>>
>
>
Date:Tue, 10 Jul 2007 12:36:51 -0700
Author:
|
Re: Randomly get timeout on SqlClient hitting localhost
Hi Dave,
Have you got any progress on this? If there is anything else we can help,
please feel free to post here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Date:Mon, 16 Jul 2007 02:05:43 GMT
Author:
|
Re: Randomly get timeout on SqlClient hitting localhost
Do you know if the debugger can cause this behavior?
--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
"Steven Cheng[MSFT]" wrote:
> Hi Dave,
>
> Have you got any progress on this? If there is anything else we can help,
> please feel free to post here.
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
Date:Sun, 15 Jul 2007 19:54:00 -0700
Author:
|
Re: Randomly get timeout on SqlClient hitting localhost
Thanks for your reply Dave,
So far I haven't found any definite record on ADO.NET 2.0's connection
timeout behavior under debugging mode, I've found one kb article mentioned
the behavior for VS 2003/.NET 1.1.
#You may receive the "Connection timeout" error message when you use SQL
debugging in Visual Studio .NET 2003
http://support.microsoft.com/?id=905853
And some former threads/cases does mentioend similar behavior, but haven't
conclude to a common definte cause.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Date:Mon, 16 Jul 2007 07:34:28 GMT
Author:
|
Re: Randomly get timeout on SqlClient hitting localhost
I have seen situations where the ConnectionTimeout value is exceeded when
pausing during some debug operations--but only on the system where the
debugging is occurring.
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
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)
-----------------------------------------------------------------------------------------------------------------------
"David Thielen" <thielen@nospam.nospam> wrote in message
news:4BE6E40D-EB32-432D-9D52-2B93EEB97676@microsoft.com...
> Do you know if the debugger can cause this behavior?
>
> --
> thanks - dave
> david_at_windward_dot_net
> http://www.windwardreports.com
>
> Cubicle Wars - http://www.windwardreports.com/film.htm
>
>
>
>
> "Steven Cheng[MSFT]" wrote:
>
>> Hi Dave,
>>
>> Have you got any progress on this? If there is anything else we can help,
>> please feel free to post here.
>>
>> Sincerely,
>>
>> Steven Cheng
>>
>> Microsoft MSDN Online Support Lead
>>
>>
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>>
Date:Mon, 16 Jul 2007 08:43:43 -0700
Author:
|
|
|