Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 268364 - Last Review: December 21, 2010 - Revision: 5.0
PRB: "Script Time Out" Error in Active Server Pages (ASP)
This article was previously published under Q268364
When you attempt to run an Active Server Pages (ASP) page, you may receive the following error message:
Error Type:
Active Server Pages, ASP 0113 (0x80004005)
The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.
The
ScriptTimeout property specifies the maximum amount of time that a script can run before it is terminated. The error is generated when the processing time of the script exceeds the maximum value that has been designated for the
ScriptTimeout property.
There are three ways to resolve this problem:
- You can increase the time that is allowed to process ASP scripts for a particular Web site. To do this, change the metabase value in Internet Information Server (IIS):
- Open Internet Services Manager.
- Expand the tree and right-click Default Web Site (or the site that has the problem).
- Click Properties.
- Click the Home Directory tab.
- Under Application Settings, click Configuration.
- Click the App Options tab.
- Increase the ASP Script Timeout value to a number high enough to prevent script timeouts.
-or-
- You can increase the time allowed to process ASP scripts for all Web sites. To do this, change the metabase value in IIS:
- Open Internet Services Manager.
- Right-click the Web Sites node.
- Click Properties.
- In Master Properties, select WWW Service, and then click Edit.
- Click the Home Directory tab.
- Under Application Settings, click Configuration.
- Click the App Options tab.
- Increase the ASP Script Timeout value to a number high enough to prevent script timeouts.
-or-
- You can use the Server.ScriptTimeOut property to programmatically increase the ScriptTimeOut property value at the page level in ASP. For example, if you want 3 minutes to pass before script processing times out, add the following line to the ASP page:
NOTE: When you set the script timeout at the page level, you cannot set it to less than the metabase value in IIS (90 seconds by default). However, you can set the script timeout value higher than the metabase value. For example, if you don't change the metabase default, and you code the following:
the ScriptTimeOut value is 90.
If you code the following:
the ScriptTimeOut value is 120.
Steps to Reproduce Behavior
- Open Internet Services Manager.
- Expand the tree and right-click Default Web Site (or the site on which you want to reproduce this problem).
- Click Properties.
- Click the Home Directory tab.
- Under Application Settings, click Configuration.
- Click the App Options tab.
- Set the ASP Script Timeout to 5.
- Create a new ASP page with the following code in the Head section:
- View the ASP page in the browser.
NOTE: An increase in timeout value can have a negative effect on server performance. You should design scripts that run within the default timeout settings. For example, an increase in script timeout value can keep IIS threads occupied and reduce the number of users that the server can serve.
For additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
182036Â
(http://kbalertz.com/Feedback.aspx?kbNumber=182036/EN-US/
)
HOWTO: Use MTS to Trap Error 'ASP 0113' Script Timed Out
APPLIES TO
- Microsoft Active Server Pages 4.0
- Microsoft Internet Information Services 5.0
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate