Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 26, 2013 01:52 PM by osmiumbin
Feb 26, 2013 01:30 PM|LINK
I have a web application that runs on windows server 2008 r2. One of the pages takes too long to process when it first loads. It takes around 15 seconds and after that its almost instant. What happens is that the w3wp.exe process jumps from under 200 MB
of RAM to 700 MB of RAM in this time. That is fine, the page is huge and requires that amount of memory. After those 15 seconds it switches back to around 200 MB of RAM and if anyone accesses that page it renders almost instant. Its only the first time it
renders regardless of who requested it. Now after some time (minutes if not tens of minutes) when someone requests the page again, it does the same thing - 15 seconds to process and it jumps to 700 MB of RAM.
I want somehow to preserve the cache of 700 MB so it doesn't expire. Even after it falls back to 200 MB of RAM the page loads instant, but my guess is that that's why after a longer period of time it 'expires' and has to render it again. I have read about
@outputcache but i'm not sure this is what i need. And there are many types of caching. Could someone point me in the right direction? I'm not worried about the
memory consumption or anything else, i just don't want a user to wait 15 seconds to load it even if it doesn't happen too often. Thanks!
PS: application written in C# under ASP.NET 4.0
Feb 26, 2013 01:36 PM|LINK
You should disable the application pool time out (in IIS settings - web site properties). In this way your application will stay in memory.
Feb 26, 2013 01:52 PM|LINK
Thanks for the tip, that is the problem indeed. The page gets recompiled after 20 minutes by default. Any disadvantages of disabling the pool time out? And how do i do that? Setting it to 0?
I also heard of precompiling the application. Any advice?
Thanks again :D