Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_database_setup thread: Re: session timeout


Message #1 by "Donna Zeller" <donna.zeller@a...> on Mon, 22 Jul 2002 12:04:56
> I'm trying to access an sql2000 table that contains 2.5+million records 
> but I get the following error:
> 
> Microsoft OLE DB Provider for ODBC Drivers error '80040e31' 
> 
> [Microsoft][ODBC SQL Server Driver]Timeout expired 
> 
> /sales2.asp, line 20 
> 
> I've looked everywhere but have not figured out how to extend the 
timeout 
> period. Is it in the global.asa. And if so could I get an example or 
could 
> it be something else. The web server I'm using is also a 2000 machine.
> Thanks in advance,
> Dave

7/21/02

We are getting the same error message - this is our connection line-we 
close all recordsets after querying - Also, we only receive this error for 
one customer with a huge amount of data - all of the other customers work 
fine:

Set objDC = Server.CreateObject("ADODB.Connection")
objDC.Open Application("Database1_connectionstring")
Message #2 by "Ryan Pusher" <theepushers@h...> on Mon, 22 Jul 2002 09:15:39 -0400
If you're suspecting that this is caused by a timeout this is how it would 
look in the global.asa:

<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart

'Session will timeout in 80 minutes
Session.Timeout = 80

Make sure that it is in the application_onstart section.

Ryan.

>From: "Donna Zeller" <donna.zeller@a...>
>Reply-To: "ASP Database Setup" <asp_database_setup@p...>
>To: "ASP Database Setup" <asp_database_setup@p...>
>Subject: [asp_database_setup] Re: session timeout
>Date: Mon, 22 Jul 2002 12:04:56
>
> > I'm trying to access an sql2000 table that contains 2.5+million records
> > but I get the following error:
> >
> > Microsoft OLE DB Provider for ODBC Drivers error '80040e31'
> >
> > [Microsoft][ODBC SQL Server Driver]Timeout expired
> >
> > /sales2.asp, line 20
> >
> > I've looked everywhere but have not figured out how to extend the
>timeout
> > period. Is it in the global.asa. And if so could I get an example or
>could
> > it be something else. The web server I'm using is also a 2000 machine.
> > Thanks in advance,
> > Dave
>
>7/21/02
>
>We are getting the same error message - this is our connection line-we
>close all recordsets after querying - Also, we only receive this error for
>one customer with a huge amount of data - all of the other customers work
>fine:
>
>Set objDC = Server.CreateObject("ADODB.Connection")
>objDC.Open Application("Database1_connectionstring")
>theepushers@h...
>%%email.unsub%%
>




_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

Message #3 by "Ken Schaefer" <ken@a...> on Tue, 23 Jul 2002 13:42:39 +1000
This is not a session timeout. This is a connection or command timeout.

It is taking too long for the database to process the command, so ADO is
giving up waiting for the database to finish.

SQL Server 2000 should have no problems with 2.5 million records - obviously
it depends on what you are trying to do. I suggest you use the various SQL
Server tools to see if you can optimise the indexes on this table (there is
a wizard that can be used, and you can also see the execution plan/cost in
QA).

If you really have to increase the connection or command timeouts there are
properties of the connection and command objects to do this:

objConn.Timeout = xx
objCommand.Timeout = xx

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Donna Zeller" <donna.zeller@a...>
Subject: [asp_database_setup] Re: session timeout


: > I'm trying to access an sql2000 table that contains 2.5+million records
: > but I get the following error:
: >
: > Microsoft OLE DB Provider for ODBC Drivers error '80040e31'
: >
: > [Microsoft][ODBC SQL Server Driver]Timeout expired
: >
: > /sales2.asp, line 20
: >
: > I've looked everywhere but have not figured out how to extend the
: timeout
: > period. Is it in the global.asa. And if so could I get an example or
: could
: > it be something else. The web server I'm using is also a 2000 machine.
: > Thanks in advance,
: > Dave
:
: 7/21/02
:
: We are getting the same error message - this is our connection line-we
: close all recordsets after querying - Also, we only receive this error for
: one customer with a huge amount of data - all of the other customers work
: fine:
:
: Set objDC = Server.CreateObject("ADODB.Connection")
: objDC.Open Application("Database1_connectionstring")



  Return to Index