Iis – the maximum memory that an IIS6 web site/app pool can use

debugiismemoryperformancewindows-server-2003

I have an IIS 6 server running on Windows 2003 SP2 x86. The server has 4GB of RAM and runs consistently with 2GB allocated.

I realise that with x86, the server won't utilize all of the 4GB RAM and the application space is also limited but the IIS processes seem to be limited elsewhere. w3wp.exe never has more than 500MB allocated and I occasionally get OutOfMemory exceptions from a busy .NET application (there are several applications running, each with a separate application pool).

What is the maximum memory that an IIS6 web site/app pool can use?

Best Answer

Apps under Windows x86 are limited to 2gb/ea. You can change this by adding the /3gb flag to boot.ini, but this can cause unexpected application behavior and should be used with caution. MS officially does not support this (http://technet.microsoft.com/en-us/library/bb124810.aspx)

IIS's memory limits can be set under the Recycling tab in the relevant app pool.

How are you determining that the application is never going over 500MB? If you're using Task Manager, keep in mind that it is rarely (if ever) an accurate representation of memory usage as Windows understands it. Use Process Explorer: http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

There are a number of other relevant questions:

  • Are there errors logged in your Event Logs?
  • Is it a particular line of code throwing the exceptions? If so, is this OutOfMemory exception actually an IIS problem, or a code problem?
  • Are you limiting your application pools at all with the Recyling setting?
  • Are there any other services running on this machine?

Most likely, IIS, ASP.NET, and all their associated baggage are running up against the 2GB limit even though Windows Task Manager doesn't show it. Setting Recycling limits or upgrading to x64 will probably make a huge difference.

Related Topic