• IIS Admin Blog

  • How To Configure the CGI Script Timeout Value in IIS 5.0 and 6.0

7th September 2007

How To Configure the CGI Script Timeout Value in IIS 5.0 and 6.0

posted in IIS 6.0 |

One of the most common questions people seem to ask when attempting to run some form of CGI application or script (such as PHP or Perl) on an IIS 6.0 server is “How do I change the default CGI script timeout value ?“ Quite often this is because they are trying to execute a relatively long-running script in an application and they are seeing the following error message :

“The specified CGI application exceeded the allowed time for processing”

The default value for the CGI script timeout property in the IIS metabase is 300 seconds for both IIS 5.0 and IIS 6.0 In this brief tutorial I will demonstrate the various ways in which you can modify this default value for IIS 5.0 and IIS 6.0

Configuring the CGI Timeout Value in IIS 5.0

In IIS 5.0 there are three ways in which the CGI Timeout value can be modified; these are via the MMC GUI using Internet Services Manager, editing the metabase directly using Metaedit and via the built-in Adsutil admin script. Lets look at each method in turn. Perhaps the easiest way to configure this value is via the GUI using the MMC. To do this open Interface Services Manager, right-click on the Local Machine name and click Properties. This will bring up the Internet Information Services properties dialog box shown here.

Fig. 1

In the Master Properties section ensure that the WWW Service is selected and click Edit. The WWW Service Master Properties dialog box will be shown. Click on the Home Directory tab and then click on the Configuration button as shown here.

Fig. 2

The Application Configuration dialog box will be presented. Click on the Process Options tab as shown here and you will see that the CGI script timeout value is displayed. Provided it hasn’t been altered you should see the default value of 300 seconds displayed as shown here. You can edit the timeout value directly here.

Fig. 3

There is however, one potential drawback with this method (as convenient as it is) namely that any value you specify here will be applied to all of the Web Sites on this server, which may not necessarily be desirable in every situation.

As the above GUI method is somewhat limited you are going to have to delve a bit deeper if you wish to achieve a more granular level of control over these settings on your server and apply different CGI timeout values to individual web sites.One method of doing this is to use the Metaedit tool which is a free download from Microsoft. You can get Metaedit here :

HOW TO: Download, Install, and Remove the IIS MetaEdit 2.2 Utility http://support.microsoft.com/?id=232068

Install and run Metaedit and then browse to the /LM/W3SVC branch of the IIS metabase. Locate the CGI Timeout value and you should see the default value of 300 seconds as shown here.

Fig. 4

Using Metaedit you can now configure the desired CGI Timeout value at the individual web site level. Browse to the appropriate Web Site’s properties using Metaedit and then right-click on the Site ID and click New, DWORD.

Fig. 5 

Pages: 1 2 3

This entry was posted on Friday, September 7th, 2007 at 3:16 pm and is filed under IIS 6.0. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

There is currently one response to “How To Configure the CGI Script Timeout Value in IIS 5.0 and 6.0”

Why not let us know what you think by adding your own comment! Your opinion is as valid as anyone elses, so come on... let us know what you think.

  1. 1 On February 28th, 2012, James Collett said:

    This article was a great help, despite its having been published 4 and a half years ago! The command line method of changing the CGI Timeout on IIS was exactly what we needed, not wanting to instal a downloaded snap-in on a production machine.

    Thanks!

Leave a Reply

You must be logged in to post a comment.

  • Calendar

  • November 2014
    M T W T F S S
    « Sep    
     12
    3456789
    10111213141516
    17181920212223
    24252627282930