Link to home
Create AccountLog in
Avatar of JElster
JElsterFlag for United States of America

asked on

ASP Request Timeout

Hi..
I have simple old ASP page. That times out after 30 seconds.
I've tried the following.

<%
Server.ScriptTimeout=360
%>

Which seem to have no effect.
The page returns data for a query and the Stored Procedure table 2 seconds in Query analyzer.. but the page is painting over 3000 records.
How do I increase the timeout?  Is it an IIS setting?
thx
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

http://classicasp.aspfaq.com/general/how-do-i-increase-timeout-values.html

commandTimeout
CommandTimeout tells the server how long to wait, in seconds, for completion of any command sent to the data source. This value is editable before and after the connection has been opened. The default is 30 seconds, but you can override it like this:

<%
    Set cmd = CreateObject("ADODB.Command")
    cmd.CommandTimeout = 120
%>

conn.connectionTimeout
Where conn is an ADODB.Connection object that is not yet open, the connectionTimeout property will indicate the amount of time, in seconds, to wait for an ASP application to initially connect to the data source. The default is 15 seconds; to override the default, use syntax as follows:

<%
    Set conn = CreateObject("ADODB.Connection")
    conn.ConnectionTimeout = 120
    conn.Open <connectionString>
%>

Session.Timeout
This setting controls how long, in minutes, a user's session will last. While it is wise to keep this value short for efficiency's sake, there are cases where that's just not enough time for users to get things done in your application (for example, if you have a client-side tool where the user is changing properties but not making requests to the server until they are done). The default is 20 minutes, and once 20 minutes of inactivity has occured, the session expires and all session variables are lost. You can increase the session timeout in an ASP page or in global.asa's Session_onStart() method with the following code:

  Session.Timeout = 45
 
The one we forget about is the idle timeout and this is most likely what you need.  You need to do this in iis for the application pool  http://technet.microsoft.com/en-us/library/cc771956(v=ws.10).aspx
Avatar of JElster

ASKER

My sql is not timing out
must be request?
As is I said I increased that with no effect
What is the exact error you are getting?  Your statement does not make sense to me:

The page returns data for a query and the Stored Procedure table 2 seconds in Query analyzer.. but the page is painting over 3000 records.
How do I increase the timeout?  Is it an IIS setting?


Surfing to the actual ASP page, submitting your form or whatever you need to do, what is the error and code you are getting?  Make sure you have friendly errors turned off so we can see the exact error.

thanks!
Avatar of JElster

ASKER

I don't get an error just a blank page after 30 secs.
The actual SP takes 2 second to run.
The ASP page just displays the data.
Not sure who I turn errors on...
thx
ASKER CERTIFIED SOLUTION
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer