Advanced IIS Configuration

While a comprehensive guide to managing IIS is beyond the scope of this user guide, there are several areas we'll highlight that are important to ongoing maintenance of your web server.

Web Sites and App Pools

There are two main concepts in IIS: a web site and an app pool. A web site usually refers to an actual URL where you'll be accessing the web site. The app pool, however, refers to the code behind the web site. An app pool is an isolated process that executes the code. It handles all of the requests coming in from clients' browsers.

Usually a web site will have its own app pool, but sometimes multiple web sites will share the same app pool. We recommend having one app pool for each WorkflowFirst application.

You select the app pool in the web site's settings. First go to the web site, then go to Basic Settings:

In the popup from this, we select the application pool:

To go to the application pool settings, click "Application Pools" on the left hand side:

Then double click the application pool in the center to bring up the basic settings:

Note, that here we must select .Net 2 and Classic pipeline mode - these are currently the required settings for WorkflowFirst apps (it may change in the future).

Now dismiss that window, and instead go to Advanced Settings, in the actions pane:

This will bring up the advanced settings configuration page:

There are a number of important settings you should understand here:

Enable 32-bit Applications: Currently .Net must run as a 32 bit application. Often high-memory usage applications should run as 64 bit, but seeing as WorkflowFirst leaves most caching to the database (SQL Server), it normally doesn't have high memory requirements, so running it as 32 bit does not cause any performance issues.

Start Mode: If the application isn't used often and is on a server that is shared with other applications, this can be left as "On Demand" - which means it will start up only when used, and will switch off when idle, leaving memory and processing free for other applications. If you need the application to be available all the time and immediately, set this to Always Running.

Identity: This is the user account to run this application under. You can set this to a particular account, but it must have access to the database and files in the application folder. You can also set it to LocalSystem (built-in account), but keep in mind that this provides freedom for the server application to access all resources on the server. If you set it to a specific account, you will need to make sure the password doesn't expire - or be prepared to update the password here if it changes.

Idle Time-out: This is the number of minutes the application is idle (not used) before it will shut-down and wait for someone to connect again before starting up.

Ping Enabled: The Ping settings can be useful to have IIS automatically restart a web server app pool if the application stops responding. By default this is set to 90 seconds (1.5 minutes), but it can be reduced to 45 seconds if you think it is necessary. You should experiment with different values depending on how busy the server will be.

Rapid-Fail Protection: This section can be useful to have IIS automatically detect that a server cannot be accessed and respond with an internal server error page, to let a load balancer know it should remove the server from the cluster. The default settings should suffice

Recycling: The recycling section relates to when IIS will restart an app pool. Restarting an app pool is called "recycling", and it simply terminates and restarts the process - usually something that takes a few seconds. It's important to make sure this section is configured correctly to maintain the health and accessibility of the server.

Disable Overlapped Recycle: This should be FALSE. Overlapping recycles is a useful feature that makes sure that user access isn't interrupted when an app pool is recycled. Instead it starts a second app pool, connects users to that app pool and terminates the previous app pool only when all users have finished using it.

Generate Recycle Event Log Entries: We recommend all of these are set to TRUE, so a proper log is made of when the app pool is restarted.

Private Memory Limit: This is a useful settings that will cause the app pool to recycle when too much memory is used by the server. Because of problems with memory fragmentation over time, this should be set to a reasonable value so that memory is cleared out if it gets congested. While a reasonable value is 1Gb (1048576 kilobytes), you should monitor the application over a period of a week or a month to see what the typical usage would be. It should not be too low (eg. shouldn't be lower than 204800).

Regular Time Limit: By default IIS sets this to 1740, which is 29 hours. That means that IIS will automatically recycle the application pool every 29 hours. Because of overlapping recycle, user activity will not be interrupted. We recommend leaving this as the default of 1740 to ensure that memory stays defragmented.

Virtual Memory Usage: By default IIS sets this to 0, which means there is no limit to the virtual memory it can use. Because virtual memory cannot so easily be exhausted, there is usually no reason to set a limit on this. The private memory usage limit will suffice, as this refers to actual memory used by the process.


Next Topic:
v4.2.0.956 (beta)
Up Since 2/29/2024 12:02:23 AM