Reputation: 61
I have an ASP.NET 4.0 application running on IIS hosted under a Windows Server 2012 with 8 GB total physical memory.
I noticed that the IIS Worker Process size is considerably increasing as users are logging into the application and performing their tasks.
I'm really lost on how to setup this application in order to avoid memory outage or application crash.
My question is, what is the maximum size the IIS Worker Process can reach on a Windows Server 2012 with 8GB RAM?
Do you advise me to run the Application Pool in 32-bit mode or 64-bit mode?
Do you advise me to use Web Gardening (Increase the number of IIS Worker Processes) ? What are the side-effects of using this option?
Upvotes: 6
Views: 18859
Reputation: 23078
The question is quite broad, but I think it can be partially answered.
Possible memory leaks - if the w3wp process memory (Commit Size or Memory) continues to rise, even if the number of users does not increase anymore, than you may leak memory. Check this question for more details
Application pool memory limit - maximum allowed memory for a worker process can be configured per application pool -> Recycle conditions -> Memory Based Maximums. When this memory limit is reached, the application pool is recycled (a shutdown event is sent and the actual shutdown is performed after Shutdown Limit (90 seconds by default))
No application pool memory limit - in this case, I think the limit will depending on how much memory a .NET process can allocate on your specific architecture. Using information from here, in your particular case, the memory limit should be 70% of RAM + Pagefile.
However, if memory usage is high, you should also take into consideration the following:
HostingEnvironment
value is sent as a reason when application pool is recycled due to memory max reach. Check this answer to see how to wire up things in your application to catch application pool shutdown initiation.Upvotes: 9