I have a Blazor application deployed on an IIS application pool running on an Azure server. However, I'm facing an issue with a memory leak, and while I'm working on fixing it, I want to limit the RAM usage of the application process for now. The problem is that when I set a private memory limit for the application pool, the pool keeps recycling. The application starts to crash and the pool is recycled as soon as the memory usage exceeds 1 GB, even though I’ve set the private memory limit to values like 10 GB or even 100 GB. Despite the high memory limit, the application pool keeps recycling when the memory usage reaches around 1-2 GB. I've also tried adjusting the virtual memory settings, but the issue persists. It seems like the pool is recycling at around 1 GB regardless of the memory limit I set, almost like the limit is being reset constantly. The application works fine when the memory limit is set to 0, but as soon as I set any limit, it causes the pool to recycle. Has anyone encountered a similar issue? Any suggestions on how to fix this problem or any known causes for this behavior?
I tried to set virtual memory limit and private memory limit. If limit is set to 0 everything is OK