Re: timout error on server running vb .net routine

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Bernie Yaeger (berniey_at_cherwellinc.com)
Date: 03/03/04


Date: Wed, 3 Mar 2004 15:38:40 -0500

Hi Bill,

Thanks for your response. The issue was this: before undertaking important
routines I copy a 750,000 table to a bu table - this runs in a stored proc
that I call via executenonquery. I solved the problem by simply changing
the commandtimeout property to 600 (10 minutes).

Tx for your help, as always.

Bernie

"William Ryan eMVP" <dotnetguru@comcast.nospam.net> wrote in message
news:eriNOVVAEHA.1288@TK2MSFTNGP10.phx.gbl...
> Bernie:
>
> There are two timeouts in SQL Server that you want to think about.
> Connection Timeouts and Command Timeouts. Connection Timeouts occur when
> you try to open a connection but are unable to for longer than the default
> period of time. You can only adjust this in the connectionstring b/c the
> TimeOut property is read-only...hence, once you create your connection
> string, this can't be changed. Now, once you have a connection, theh
> Command object has a timeout too. So, if you set the Command.TimeOut to
30
> seconds and the query took 35 seconds, you'd get an exception. This is
> easier to deal with b/c you can just bump it up.
>
> The big problem though is why it's taking so long to execute. Most
inserts
> should take a fraction of a second for one record so I'd probably look to
> Sql Profiler and see what's happening. Unfortunately, htere's not just
one
> thing that causes Command Timeouts, there are tons of things it could be.
> Connection timeouts are a little easier to deal with b/c it's usually that
> the server is down, no connections are available, your network cable is
> loose, stuff like that.
>
> Does it happen predictably? If so, that may help isolate it. Also, is it
a
> test server or a production server? If it's a production server, look to
> see what's happening in the background (reindexing for instance or
> updatestats may cause a temp lock on the db and may be causing this.
>
> If you can, run a trace and see if that doesn't tip you off.
>
> HTH,
>
> Bill
> "Bernie Yaeger" <berniey@cherwellinc.com> wrote in message
> news:uRKoDUUAEHA.2348@TK2MSFTNGP09.phx.gbl...
> > I'm getting the following error - not always, only randomly - when I run
a
> > certain routine (the routine is a simple executenonquery and it appears
to
> > complete despite the message) against sql server 2000:
> >
> > "timout expired. The timeout period elapsed prior to completion of the
> > operation or the server is not responding"
> >
> > Anyone have any idea what causes this and how to avoid it?
> >
> > Thanks for any help.
> >
> > Bernie Yaeger
> >
> >
>
>



Relevant Pages

  • Re: timout error on server running vb .net routine
    ... There are two timeouts in SQL Server that you want to think about. ... Connection Timeouts and Command Timeouts. ... thing that causes Command Timeouts, there are tons of things it could be. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Strange problem?
    ... Run SQL Server Profiler to see what is going on your server. ... Duration event to find out a long running queries. ... > The only connection that I can think of is that this problem occours ... > Whats even more strange is that it is only some SP's that timeouts. ...
    (microsoft.public.sqlserver.server)
  • timer
    ... I would like to have timeouts, ... I am connected to my server via ... TCP. ... If I do not close the connection, ...
    (comp.unix.programmer)
  • Re: Outgoing POP3 email missing/lost/not received
    ... Funny thing is that I have had this ISP for 8 years and it has always been ... It looks like when you last ran CEICW, you set the ISP's mail server to: ... Internet Connection Wizard. ... After the wizard completes, the following network connection ...
    (microsoft.public.windows.server.sbs)
  • Re: Cannot connect client to server 2003
    ... you need to reconfigure the IP schema of your SBS ... On the SBS 2003 Server open the Server Management console. ... On the Connection Type page, click Broadband, and then click Next. ... Alternate DNS server, type the IP addresses that are provided by your ISP ...
    (microsoft.public.windows.server.sbs)