Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a max value for ScriptTimeout? 3

Status
Not open for further replies.

XgrinderX

Programmer
Mar 27, 2001
225
0
0
US
I have not been able to find anything that says that there is a max number of seconds that you can set the Server.ScripTimeout to. Am I wrong? Can I set the Server.ScriptTimeout to 1000000 if I wanted to?
 
yes, I believe you can. not sure why you would want to but you can. If the set it too long it will suck quite a bit of server resources and slow everything down. Something to think about _________________________________________________________
for the best results to your questions: FAQ333-2924
[sub]01001111 01101110 01110000 01101110 01110100[/sub]
onpnt2.gif
[sup] [/sub]
 
hmm.. now that I think of it. you may need to adjust IIS timeout alues also if the scripttimeout value exceeds that specified value. for some reason I rememebr having to do this once. I do not believe this is valid for setting the timeout value in your ASP pages though, jsut the scripttimeout value. liek I said "I think" may not matter but if it still times out this may be the reason _________________________________________________________
for the best results to your questions: FAQ333-2924
[sub]01001111 01101110 01110000 01101110 01110100[/sub]
onpnt2.gif
[sup] [/sub]
 
Thanks.

I do not REALLY want to set it to that huge of a number, but I didn't know if there was an upper limit or not. I have seen instructions for upload scripts that ask you to set the ScriptTimeout to 3600 which is an hour, but I didn't know if that was the max or not.
 
nope, no max...set away [wink] _________________________________________________________
for the best results to your questions: FAQ333-2924
[sub]01001111 01101110 01110000 01101110 01110100[/sub]
onpnt2.gif
[sup] [/sub]
 
onpnt -

Did you ever find out about that IIS setting? What is the max? I'm going to have to execute a very important script in about a month and tests show it will take about 5000 seconds (so I want to set the ScriptTimeout to about 7500 - hait to wait that long if it's going to quit 30 seconds before completion).

I may not have the ability to access the IIS seetings...

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook
 
I remembered I started compiling a list of resources for this after this question was raised as i honestly was not 100% sure. Well, I could not find one reference to the fact the AspScriptTimeout Metabase property had a max setting. I ran tests set to 99999999 and the script although bogged my system as it should ahve ran forever and forever. :)

Here is what I was reading into and searching around in
<src steps to change IIS settings on timeout>
ASP Script Timeout

When you set the ASP script timeout, you specify, in seconds, the default length of time that ASP pages allow a script to run before terminating the script and writing an event to the Microsoft Windows® Event Log. The minimum value for this property is one second and the default value is 90 seconds. The corresponding metabase property is AspScriptTimeout

To change ASP script timeout

1. In IIS Manager, expand the local computer, right-click the starting-point directory of the application you want to configure, and then click Properties.
2. Click the Directory tab, and then click Configuration.
3. Click the Options tab.
4. In the Application configuration section, in the ASP script timeout box, click the up or down arrow to set the number of seconds before an error message is returned.
5. Click OK.
</src>

Session.Timeout:
Sets the number of minutes the server should keep the user's session information (for all Session objects, not just the current session object), without refreshing or requesting a page. Default value is 20.

this may be a solution for you
This was one I did not remember about but should have
Query timeout

One of the most vexing problems (though quite simple to solve) is the &quot;Query Timeout&quot; problem.

Generally, the problem is that the querying script times out after a minute or so. When a long-running query is run from inside SQL Server it finishes in a few minutes, so you know the query is fine, but setting the Server.ScriptTimeout and Connection.ConnectionTimeout properties to longer periods doesn't solve the problem.

…and the answer is: Set the Command.CommandTimeout property to as long a period as you need. This allows you to set the maximum time you're prepared to have ADO wait for the Command (i.e. the query) to execute. With the ConnectionTimeout property, on the other hand, you are setting the maximum time allowed for the Connection to open.

Script Timout
When an ASP script is run, it is given a fixed amount of time to complete processing before it will time out. The length of time before this happens can be set in two ways, either via the MMC, or by using Script.Timout in the code. By default this is set to 90 (seconds), but can be altered as necessary on the fly in code. As a basic rule of thumb, leave it set to the default in most cases, but on occasions it may be required to increase it slightly (say to 180 seconds) for a large script to complete processing. If this is the case, the script timeout should be set at the beginning of the script concerned, and then reset to the default at the end. Of course, one should probably be writing a component for tasks such as these...


again, this was all things we all already new about the TimeOut and ScriptTimeOut. The bottom line was I could not find a reference to a max value for them and i never heard a member out of our 22,000 here mention one. unless they like to keep secrets. [wink]

____________________________________________________
[sub]The most important part of your thread is the subject line.
Make it clear and about the topic so we can find it later for reference. Please!! faq333-3811[/sub]
onpnt2.gif
 
Thanks for the great, thorough answer. I had already set the command timeout to 30 seconds (the longest query takes about 15 seconds) - guess I'll know when I fire it up!

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook
 
[smile]

____________________________________________________
[sub]The most important part of your thread is the subject line.
Make it clear and about the topic so we can find it later for reference. Please!! faq333-3811[/sub]
onpnt2.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top