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?
A healthy IIS Server will consume approximately 300 - 600 MB, maybe 700 MB RAM when busy. When it uses more than 700 MB RAM, it's telling you that: You have a lot of concurrent web users.
Right-click the WsusPool and choose Advanced Settings. When the Advanced Settings window opens up find the Recycling section near the bottom. Change Private Memory Limit (KB) to a higher number that fits your server specifications or '0', which means no limit, instead of the hard-coded 1843200. Hit OK.
In general, high memory is when your ASP.NET worker process (Aspnet_wp.exe) or Internet Information Services (IIS) worker process (W3wp.exe) memory is consistently increasing and isn't returning to a comfortable level.
Private memory is the maximum amount of memory (in KB) a worker process can consume before causing an application pool to recycle. Private Memory restricts web applications from consuming more memory than the assigned limit. Default application pools have private memory of 0 KB, which means there is no limit.
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.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With