title: What are good values for "Private Memory Limit" and "Virtual Memory Limit" in IIS application pools hosting 32-bit ASP.NET applications?
body: <p>We recently had a ASP.NET web application (running in a 32-bit application pool), which was running well for years without problems, fill its log with OutOfMemoryExceptions. Recycling the application pool fixed the issue.</p>
  
  <p>I am aware the the correct long-term solution is to</p>
  
  <ul>
  <li>find, identify and fix any memory leaks, and</li>
  <li>migrate the application to 64 bit and provide more memory, if needed.</li>
  </ul>
  
  <p>Until that is done, I want to at least keep the service available. Fortunately, application pools in IIS conveniently allow me to configure a <em>"Private Memory Limit (KB)"</em> and a <em>"Virtual Memory Limit (KB)"</em>, which cause the application pool to be recycled automatically, once those limits are reached.</p>
  
  <p>I want to set those options to values which are </p>
  
  <ul>
  <li>as high as possible, to avoid unnecessary application pool recycle operations, but</li>
  <li>as low as necessary to prevent OutOfMemoryExceptions.</li>
  </ul>
  
  <p>Since 32-bit applications can use at most 2GB of virtual memory, I'd ... just set both options to slightly below 2GB? Is it really that simple or am I missing something?</p>