PRB: "Script Time Out" Error in Active Server Pages (ASP)

Article translations Article translations
Article ID: 268364 - View products that this article applies to.
This article was previously published under Q268364
Expand all | Collapse all

On This Page

SYMPTOMS

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.

CAUSE

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.

RESOLUTION

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):
    1. Open Internet Services Manager.
    2. Expand the tree and right-click Default Web Site (or the site that has the problem).
    3. Click Properties.
    4. Click the Home Directory tab.
    5. Under Application Settings, click Configuration.
    6. Click the App Options tab.
    7. 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:
    1. Open Internet Services Manager.
    2. Right-click the Web Sites node.
    3. Click Properties.
    4. In Master Properties, select WWW Service, and then click Edit.
    5. Click the Home Directory tab.
    6. Under Application Settings, click Configuration.
    7. Click the App Options tab.
    8. 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.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Open Internet Services Manager.
  2. Expand the tree and right-click Default Web Site (or the site on which you want to reproduce this problem).
  3. Click Properties.
  4. Click the Home Directory tab.
  5. Under Application Settings, click Configuration.
  6. Click the App Options tab.
  7. Set the ASP Script Timeout to 5.
  8. Create a new ASP page with the following code in the Head section:
  9. 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.

REFERENCES

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
182036 HOWTO: Use MTS to Trap Error 'ASP 0113' Script Timed Out

Properties

Article ID: 268364 - Last Review: December 21, 2010 - Revision: 5.0
APPLIES TO
  • Microsoft Active Server Pages 4.0
  • Microsoft Internet Information Services 5.0
Keywords: 
kbaspobj kbprb KB268364

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com