In some cases though the timeout in Enterprise Tester may be set very high, but timeout's still occur much earlier than the configured timeout period - normally after approximately 20 minutes of idle time. This normally affects IIS6 & IIS7, and is predominantly caused by the application pool "idle timeout" period due to Enterprise Tester's default usage of "in-proc" state session storage. 

There are a couple of approaches to resolving this problem: 

  1. Increasing the idle timeout for the application pool.

  2. Configuring Enterprise Tester use "out of proc" session storage.

Increasing the Idle Timeout of the Application Pool

The idle timeout determines the number of minutes the application pool (and thus the application Enterprise Tester) will be held in memory, with any requests being made, before the application is automatically unloaded from memory.

On most default IIS installations, this value will default to 20 minutes.

In addition there is also another setting, which controls the maximum number of minutes the application pool can be active before it is recycled - this setting is the "Regular Time Interval (minutes)" Recycle trigger. This feature is intended to recycle the process on a regular basis (normally every 1-2 days) to avoid the effects of memory leaks etc. that may exist in software. 

Altering the values in IIS6.

  • Go to Control -> Administrative Tools -> Internet Information Services (IIS) Manager.

  • Expand the server node, you will see an "Application Pools" node.

  • Right click on the Application pool (it will normally be the "Default App Pool", but it may alternatively be called "Enterprise Tester") and select Properties...

  • On the dialog, click on the Recycling tab - from here you can configure how long an application pool will be active before it's forced to recycle - this should be set to a value greater then 24 hours (i.e. 1440 minutes).

  • Switch to the "Performance tab".

  • Locate the "Shutdown work processes after being idle for (time in minutes)" setting. You can either choose to uncheck the checkbox (disabling this all together) - or alternatively, set the value to be the same as (or higher) then the timeout value configured in Enterprise Tester.


 

Altering the Values in IIS7

  • Go to Control -> Administrative Tools -> Internet Information Services (IIS) Manager.

  • Expand the server node, then select the "Application Pools" node.

  • Select the pool being used for Enterprise Tester (usually "DefaultAppPool") - though in some cases a specific "EnterpriseTester" pool may have been created.

  • With the pool selected, on the right hand actions list select "Advanced Settings..."

  • Scroll down until you locate the "Process Model" section - here you can configure the "Idle Time-out (minutes)" value, set the value to be the same as (or higher) then the time-out value configured in Enterprise Tester.

  • Scroll down until you locate the "Recycling" section, and configure that the "Regular Time Interval (minutes)" is configured for a value greater then 24 hours (ie. 1440 minutes).


 

Configuring Enterprise Tester to Use "out-of-proc" Session State Storage

Included with the .NET SDK is a Windows® NT service: ASPState. This Windows service is what ASP.NET uses for out-of-process session state management. To use this state manager, you first need to start the service. To start the service, open a command prompt and type: 

net start aspstate

What you'll see is: 

At this point, the Windows NT Service ASPState has started and is available to ASP.NET. Next, we need to configure ASP.NET to take advantage of this service. To do this we need to update the web.config:

Locate the <system.web> section, then add this immediately beneath it: 

<sessionState mode="StateServer"
    stateConnectionString="tcpip=127.0.0.1:42424"
    cookieless="false"
    timeout="20"/>

Then save the changes. 

At this point the application should start using the state server for storing session information - this is a resilient store that will survive when the application pool is recycled. 

See this msdn article for more details on in-proc and out-of-proc session state in ASP.Net.

  • No labels