Hello Ivan Brnelić,
Thank you for posting your question in the Microsoft Q&A forum.
The issue you are encountering with the IIS application pool recycling when setting a private memory limit is a common challenge, especially when dealing with memory leaks in applications like Blazor.
When you set a private memory limit for an IIS application pool, the pool is designed to recycle when the memory usage exceeds the specified limit. However, in your case, the pool is recycling at around 1-2 GB, even though you’ve set the limit much higher (e.g., 10 GB or 100 GB). This suggests that something is overriding or interfering with the memory limit configuration.
The issue of the IIS application pool recycling prematurely when a private memory limit is set is likely due to a combination of factors, including configuration overrides, system-wide limits, or the memory leak in your Blazor application. Please refer below documentation to verify the configurations:
- Configure Application Pool Recycling Settings in IIS
- Troubleshoot High Memory Usage in IIS
- DebugDiag Tool for Memory Leak Analysis
- ASP.NET Core Blazor Hosting Models
While you work on resolving the memory leak, you can try the following workaround:
- Set the Private Memory Limit to 0 (unlimited) to prevent recycling.
- Use Performance Monitor to track memory usage and manually recycle the application pool when memory usage becomes excessive.
If the above answer helped, please do not forget to "Accept Answer" as this may help other community members to refer the info if facing a similar issue.