Re: Timeout Expired (0x80040E31)

From: Scott Elgram (SElgram_at_verifpoint.com)
Date: 03/23/04


Date: Tue, 23 Mar 2004 13:46:23 -0800

Running the same INSERT query in the query analyzer works just fine. Just a
little bit ago it was working only for my computer, then it started working
for everyone about 30 min later.

Could a corrupt table or something similar cause intermittent timeout
errors.

-- 
-Scott Elgram
"Val Mazur" <group51a@hotmail.com> wrote in message
news:u1IwF7CEEHA.2804@tk2msftngp13.phx.gbl...
> Hi Scott,
>
> Those kind of error are most difficult to trace. If it was working before
> then try to analyze what was changed recently in your or network
> environment. Also try to run SQL Profiler to see how your query executed
on
> a server side
>
> -- 
> Val Mazur
> Microsoft MVP
>
>
> "Scott Elgram" <SElgram@verifpoint.com> wrote in message
> news:Oj1BtqCEEHA.3696@TK2MSFTNGP10.phx.gbl...
> > Val,
> >    The file growth is set to automatically increase by 10% and the
maximum
> > file size is unrestricted.  This is true for both data files and
> > transaction
> > log.  If this is what was causing the error why did it only start
> > happening
> > now.  It's very strange....for over a year it is working without flaw
and
> > then all of a sudden this.
> >
> > -- 
> > -Scott Elgram
> >
> > "Val Mazur" <group51a@hotmail.com> wrote in message
> > news:u7t15TrDEHA.2712@TK2MSFTNGP10.phx.gbl...
> >> Hi Scott,
> >>
> >> Just some thoughts. Do you know how you SQL Server configured to
increase
> >> database and transaction log when it reaches limit? It is possible that
> > when
> >> database reaches limit, then SQL Server will try to extend it and it
> >> takes
> >> some time. Here you could get error
> >>
> >> -- 
> >> Val Mazur
> >> Microsoft MVP
> >>
> >>
> >> "Scott Elgram" <SElgram@verifpoint.com> wrote in message
> >> news:OCCxggUDEHA.3152@TK2MSFTNGP10.phx.gbl...
> >> > Why is it then that it works great and fast most of the time except
for
> >> > every once in a while it just stops with that error?
> >> >
> >> > -- 
> >> > -Scott Elgram
> >> >
> >> > "Val Mazur" <group51a@hotmail.com> wrote in message
> >> > news:%23wf42SUDEHA.3016@TK2MSFTNGP11.phx.gbl...
> >> >> Yes, it could be, since it would require huge changes in index.
> >> >>
> >> >> -- 
> >> >> Val Mazur
> >> >> Microsoft MVP
> >> >>
> >> >>
> >> >> "Scott Elgram" <SElgram@verifpoint.com> wrote in message
> >> >> news:%23R6RjMQDEHA.3404@TK2MSFTNGP10.phx.gbl...
> >> >> > Val,
> >> >> >    The table has primary keys on 8 of the columns.  I am unsure
why
> > the
> >> >> > person who set this table up did it this way.  Could this be the
> > cause
> >> > of
> >> >> > the problem?
> >> >> >
> >> >> > Thanks,
> >> >> > -- 
> >> >> > -Scott Elgram
> >> >> >
> >> >> > "Val Mazur" <group51a@hotmail.com> wrote in message
> >> >> > news:%2374XV8IDEHA.3568@tk2msftngp13.phx.gbl...
> >> >> >> Hi Scott,
> >> >> >>
> >> >> >> If you get this error sometimes, then it is possible that your
> >> >> >> table
> >> > has
> >> >> >> a
> >> >> >> lot of indexes, which require updating each time when you insert
> >> >> >> new
> >> >> > record.
> >> >> >> Check if you do not have this situation. To extend timeout period
> > you
> >> >> > would
> >> >> >> need to set CommandTimeout property of the Command or Connection
> >> > object,
> >> >> >> depending on a way you execute your query. You could set it to 0
> >> >> >> and
> >> >> >> in
> >> >> > this
> >> >> >> case provider will wait until SQL statement finishes completely.
> >> >> >>
> >> >> >> -- 
> >> >> >> Val Mazur
> >> >> >> Microsoft MVP
> >> >> >>
> >> >> >>
> >> >> >> "Scott Elgram" <SElgram@verifpoint.com> wrote in message
> >> >> >> news:ulgj5OtCEHA.1236@TK2MSFTNGP11.phx.gbl...
> >> >> >> > Hello,
> >> >> >> >    I have an ASP page that runs a simple INSERT query.
Sometimes
> >> > this
> >> >> >> > page
> >> >> >> > works great, but, every once in a while it will stop working
and
> >> >> >> > give
> >> >> >> > users
> >> >> >> > the error;
> >> >> >> >
> >> >> >> > Microsoft OLE DB Provider for ODBC Drivers (0x80040E31)
> >> >> >> > [Microsoft][ODBC SQL Server Driver]Timeout expired
> >> >> >> >
> >> >> >> > When it does this I try franticly to find the reason why but I
> >> >> >> > can
> >> > not
> >> >> >> > find
> >> >> >> > anything wrong.  It started when the page was using an "AddNew"
> >> > command
> >> >> > to
> >> >> >> > insert a record.  I changed it to an "INSERT INTO" query and it
> >> > worked
> >> >> > for
> >> >> >> > 2
> >> >> >> > or 3 days then it stopped with the same error.  So then I
> >> >> >> > archived
> >> >> >> > about
> >> >> > a
> >> >> >> > 3rd of the table and it started working again.  Today it broke
> >> >> >> > again,
> >> > I
> >> >> >> > changed the "INSERT INTO" query to a stored procedure on our
SQL
> >> >> >> > 7
> >> >> > server
> >> >> >> > and it still didn't work.  Next I tried setting the
> >> >> > "Server.ScriptTimeOut
> >> >> >> > =
> >> >> >> > 500" and "db.CommandTimeout = 1200" and sent it on it's way.
> >> >> >> > That
> >> >> > didn't
> >> >> >> > seem to help either, it didn't error but it's working again
> > without
> >> > any
> >> >> >> > changes.  I'm at a loss as to why though.  Has anyone
experienced
> >> > this
> >> >> >> > before or has some knowledge on why this is happening
> > periodically?
> >> >> >> > -- 
> >> >> >> > -Scott Elgram
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>
>


Relevant Pages

  • Re: About SQL Query.
    ... Chris Hanscom - Microsoft MVP ... >> Ssql is a string of sql query and it executes well in Query Analyzer. ...
    (microsoft.public.vb.general.discussion)
  • Re: create multiples Stored Procedures usign ADOB command
    ... > "Val Mazur" wrote in message ... >> Since GO is not a valid Transact-SQL statement, but a batch statement, ... >>> Into query analyzer, to run a query batch, GO command is used to run ...
    (microsoft.public.vb.database.ado)
  • Re: Backup Database! this is really interesting!!
    ... Try this from Query Analyzer: ... But the myserver is the ... > windows explorer from another computer on LAN. ...
    (microsoft.public.sqlserver.server)
  • Re: Problem using LIKE in a command object
    ... the method that builds the query, so that's where "key" comes from in my code. ... >> I'm trying to use a select command as the CommandText of an ADO.NET ... >> Dim dr as SqlDataReader ... >> it's enclosed in single quotes (like it would be in the Query Analyzer ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Problem using LIKE in a command object
    ... > works like a champ in Query Analyzer - just not in my code! ... >>> I'm trying to use a select command as the CommandText of an ADO.NET ... >>> it's enclosed in single quotes (like it would be in the Query Analyzer ... >>> BBM ...
    (microsoft.public.dotnet.framework.adonet)