Re: "Timeout expired. " when using Fill Method

From: William \(Bill\) Vaughn (billvaRemoveThis_at_nwlink.com)
Date: 06/28/04


Date: Mon, 28 Jun 2004 14:58:18 -0700

Well, there are many issues to consider here so just setting the
CommandTimeout to a higher number (or infinity--which I rarely recommend)
might only make matters worse. You need to investigate why you're timing
out. Is the query too complex? Is the query processor waiting for resources?
Is it blocked by other operations (even temporarily)? Are you returning too
many rows?

hth

-- 
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
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.
__________________________________
"Shawn" <Shawn@discussions.microsoft.com> wrote in message
news:C67C8A7E-20D6-4AED-8A96-8F6AD1A93E2A@microsoft.com...
> Once a while, my web application gets this error message:
> "System.Data.SqlClient.SqlException: Timeout expired. The timeout period
elapsed prior to completion of the operation or the server is not
responding."
>
> From the Stack Trace:
> [SqlException: Timeout expired.  The timeout period elapsed prior to
completion of the operation or the server is not responding.]
>    System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
>    System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
behavior)
>
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(Comman
dBehavior behavior)
>    System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
>    System.Data.Common.DbDataAdapter.Fill(DataTable dataTable, IDbCommand
command, CommandBehavior behavior)
>    System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
>
>
> In the webconfig file, I set the timeout = 3600.
>
> Is there anything I should be aware of?  The problem is that it works
sometimes.
>
> Thanks!
>
>
> Here is my code: (it's quite simple.)
>
>         Dim myConnection As New
SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("connSt
r1"))
>         Dim myCommand As New SqlCommand
>         With myCommand
>             .CommandType = CommandType.StoredProcedure
>             .CommandText = "dbo.spABC"
>             .Connection = myConnection
>         End With
>
>         Dim adp As New SqlClient.SqlDataAdapter
>         adp.SelectCommand = myCommand
>         Dim myTable As New DataTable
>         adp.Fill(myTable)


Relevant Pages

  • Re: Really need help on this one
    ... Is there a way to read the output of a particular command into ... Heres a better example using ssh. ... set timeout $timeout ... exec kill -9 $pid ...
    (comp.lang.tcl)
  • Re: What if Expect buffer overflows
    ... expect_outwhen eof and timeout events happen. ... with your command and see what happens. ... Can anybody please guide what should I do to display the whole info? ...
    (comp.lang.tcl)
  • Re: Timeout error from SqlDataReader even when ConnectionTimeout = 0
    ... as well as the ConnectionTimeout. ... > Make sure you also set Command Time out to a large enough value. ... > Command Timing out even though Connection timeout is not reached. ... >> at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, ...
    (microsoft.public.dotnet.framework.adonet)
  • aac0 command timeouts
    ... Today one of my admins noticed the following errors on a 6.0-REL-p4 system with an Adaptec 2230SLP RAID card: ... aac0: COMMAND 0xffffffff80841700 TIMEOUT AFTER 36 SECONDS ...
    (freebsd-stable)
  • Re: [mfi] command timeouts
    ... It's not only this process but all disk IO related processes. ... mfi0: COMMAND 0xffffffff80c3c040 TIMEOUT AFTER 732 SECONDS ...
    (freebsd-current)