Last post Aug 17, 2012 05:35 AM by fullsocrates
Aug 17, 2012 02:10 AM|padmaja vinodh|LINK
we have Asp.Net web application. When user logged in and did some transactions IIS emmeory increased to 20 to 30 MB. After user Loged Out the memory still not come down.
Upon user click "LogOut" we are clearing all sessions using Session.Abandon() statement. But still not come down. In Forums i understand that, Session.Abandon will remove cache from client side not from server side.
How do i clear server cache upon user logged out ? I know we can recycle IIS Application pool every dat at 2:00 or 3:00AM. but this is not the actual solution we are looking.
we want to know how to clear IIS cache upon user logged out? help me is there any other ways can remove unused cache from IIS automatically?
Aug 17, 2012 05:35 AM|fullsocrates|LINK
Instead of a direct answer, I'd like to share my opinion, which is different anaysis for same data - increased IIS memory.
I also think the 10Mb can be leaked memory, and can be an issue possibly. My opinion is more about memory growth itself.
If I'm a developer of IIS, I'm going to design IIS worker process to keep loading anything reusable, as long as a system has enough available memory. For example, if a user send requests to run some transactions, then the worker process will have to compile
ASP, or ASP.NET applications, and generate excutable binaries, load dependant IIS & .NET libraries. A compiled binary module can be a few megabytes, although a script is a few kilobytes. I want IIS to keep them in the process memory. By doing so, following
requests for the same applications can have better throughput than the first request. I'll be happy if IIS doesn't release memory just after using it. ;)
I assume that the IIS memory you mentioned, is amount of private bytes for W3WP(application pool). In your case, there's 10MB increasement after user's logging out. I think the 10MB may not be for session objects only, and session related objects are going
to be disposed properly after timeout.
In many cases, a worker process need to load and maintain various kinds of objects in a process memory - they're static resource files, compiled binaries, session objects, cache objects, heap objects to be disposed, and IIS libraries. I won't want to recycle
worker processes to lose all of them & rebuild again, as long as (1) IIS server has enough available memory, or (2) it doesn't meet OOM(out-of-memory exception) conditions.