StarDomain

IIS Application Pools Guide

IIS Application Pools Guide

Application pools in Internet Information Services (IIS) are a fundamental concept for hosting websites and applications on Windows servers. This guide explains what application pools are, how they work, and how to manage them on {{COMPANY_NAME}} Windows hosting.

What Is an Application Pool?

An application pool (app pool) is a container that isolates one or more web applications from each other on an IIS web server. Each app pool runs as a separate worker process (w3wp.exe), providing:

  • Process isolation: If one application crashes, other applications in different pools are unaffected
  • Resource management: Memory and CPU usage can be controlled per pool
  • Security isolation: Each pool runs under its own identity with specific permissions
  • Independent configuration: Each pool has its own .NET CLR version, pipeline mode, and recycling settings

How Application Pools Work

Worker Processes

Each app pool spawns one or more worker processes (w3wp.exe). These processes:

  • Handle HTTP requests for the websites assigned to that pool
  • Run under a specific Windows identity (usually ApplicationPoolIdentity)
  • Have their own memory space and resources
  • Can be recycled (restarted) independently

Pipeline Modes

IIS application pools support two pipeline modes:

#### Integrated Mode (Recommended)

  • ASP.NET is fully integrated into the IIS request pipeline
  • Better performance and fewer configuration conflicts
  • All HTTP modules and handlers work together
  • Required for modern ASP.NET applications

#### Classic Mode

  • ASP.NET runs as a separate ISAPI filter
  • Provided for backward compatibility with older applications
  • Use only when Integrated mode causes issues with legacy applications

.NET CLR Version

Each app pool is configured for a specific .NET version:

  • v4.0 — For .NET Framework 4.x applications (most common)
  • v2.0 — For .NET Framework 2.0/3.0/3.5 applications
  • No Managed Code — For non-.NET applications (PHP, static HTML, Node.js)

Managing Application Pools in Plesk (Windows)

On {{COMPANY_NAME}} Windows hosting with Plesk:

Viewing Your App Pool

  1. Log in to Plesk
  2. Go to Websites & Domains
  3. Click on your domain
  4. Click Hosting Settings or IIS Application Pool
  5. View the current app pool configuration

Configuring App Pool Settings

  1. In the IIS Application Pool section, you can configure:

- Pipeline mode: Integrated or Classic

- .NET Framework version: v2.0, v4.0, or No Managed Code

- Enable 32-bit applications: Required for some legacy applications

  1. Make your changes and click OK

Tip: For PHP websites on Windows hosting, set the .NET CLR version to "No Managed Code" since PHP does not require the .NET framework.

Application Pool Recycling

Recycling restarts the worker process of an app pool, clearing its memory and resetting its state. This is important for maintaining performance and stability.

Why Recycle?

  • Memory leaks: Long-running processes can accumulate memory over time
  • Performance degradation: Application performance may degrade after extended uptime
  • Configuration changes: Some changes require a process restart
  • Stuck processes: A hanging worker process can be recovered by recycling

Automatic Recycling

IIS automatically recycles app pools based on configured conditions:

TriggerDefaultDescription
Time interval1740 minutes (29 hours)Recycles after a set time period
Specific timesNot setRecycle at scheduled times (e.g., 3:00 AM)
Request limitNot setRecycle after a set number of requests
Memory limit (virtual)Not setRecycle when virtual memory exceeds threshold
Memory limit (private)Not setRecycle when private memory exceeds threshold

Manual Recycling

To manually recycle your app pool (restart your application):

  1. In Plesk, go to Websites & Domains
  2. Click on your domain
  3. Find the IIS Application Pool section
  4. Click Recycle or Restart

Tip: If your ASP.NET application becomes unresponsive or shows unexpected errors, recycling the app pool is often the fastest fix. It is equivalent to restarting the application without affecting other sites.

Common Application Pool Issues

503 Service Unavailable

Cause: The app pool has stopped or crashed.

Solution:

  1. Check if the app pool is running in Plesk
  2. Start or recycle the app pool
  3. Check event logs for the crash reason
  4. Common causes: incorrect .NET version, missing dependencies, permission errors

500 Internal Server Error

Cause: Application error within the worker process.

Solution:

  1. Enable detailed error messages in Plesk or web.config
  2. Check the application logs
  3. Verify the .NET version and pipeline mode match your application requirements
  4. Recycle the app pool and try again

High Memory Usage

Cause: Memory leak in the application or large data processing.

Solution:

  1. Recycle the app pool to release memory
  2. Review application code for memory leaks
  3. Implement proper disposal of database connections and large objects
  4. Consider setting a private memory limit to trigger automatic recycling

Slow Application Startup

Cause: After recycling, the first request triggers application initialization ("cold start").

Solution:

  1. This is normal behavior — the first request after a recycle loads the application
  2. Pre-compilation of ASP.NET views can reduce startup time
  3. Idle timeout (if configured) stops the pool after inactivity, causing another cold start

Troubleshooting

  • App pool keeps stopping: Check the Windows Event Log (if accessible) or contact support. Common causes include incorrect application code, missing .NET dependencies, or permission issues.
  • Application not using correct .NET version: Verify the app pools CLR version matches your application. A .NET 4.x app will not work on a v2.0 pool.
  • PHP not working on Windows: Ensure the app pool is set to "No Managed Code" for .NET CLR version. PHP runs outside the .NET framework.
  • Cannot access IIS settings: On shared hosting, app pool settings are managed through Plesk. Not all IIS settings are directly accessible.
  • Changes not taking effect: Recycle the app pool after making configuration changes.

Need help with IIS application pools? Contact {{COMPANY_NAME}} support at {{SUPPORT_EMAIL}} or open a ticket at {{SUPPORT_URL}}.