English 中文(简体)
Recover memory from w3wp.exe
原标题:
  • 时间:2010-07-29 13:34:27
  •  标签:
  • w3wp.exe

Is it possible to recover memory lost from w3wp.exe? I thought a session.abandon() should clear up the resources like that? The thing is I have a web application, certain pages make w3wp.exe grow significantly. Like from 40 MB to 400 MB. Now I am going to optimize my code defiantly to reduce this, however for what ever amount the w3wp.exe grows, is there no way to recover the lost memory even when the user has logged out and closed the browser?

I know this worker process will recycle after 30 minutes (default) of idle use, but what if there is no idle use-age for a long time and the worker process still has that portion of memory, it just keeps on growing? Any thoughts people?

最佳回答

The garbage collector will take care of whatever memory needs to be freed, provided that you dispose things correctly, etc. The GC doesn t immediately kick in every time you call Session.Abandon(), as that would be a major performance hit.

That said, every application has a "normal" memory usage, i.e. a stable memory usage (again, provided you don t have leaks), and this figure is different for every application. 400MB can be a lot or it can be nothing, depending on what your app does. I have apps that hover around 400MB and others around 1.5GB and that s OK as long as memory usage stabilizes somewhere. If you see unbounded memory usage then you most likely have a leak somewhere in your app.

Storing large amounts of data in the in-proc session can also quickly rack up the memory usage. Instead, use a file or a database to store this data.

问题回答

unless you are leaking the memory, the memory manager will re-use this memory so you should not see the process memory keep growing.





相关问题
Do I have a memory leak in my website? [closed]

I have a website which prepared with ASP.NET MVC 3 and Entity Framework 4.1. This image below is my server s perfmon logs. My problem is w3wp.exe is getting bigger and bigger at every minutes and ...

high cpu useage on w3wp process

I am encountering an issue with my asp.net c# web application where the server is hitting very high cpu useage eg. 80%+ on w3wp process. This has only happened recently after I made numerous changes ...

SQL Server timeout caused by w3wp.exe crashing

I have a ongoing issue with my website, where it appears the W3wp.exe crashes and in turn anyone attempting to connect to the site will receive a SQL server timeout error. The error is this... ...

Recover memory from w3wp.exe

Is it possible to recover memory lost from w3wp.exe? I thought a session.abandon() should clear up the resources like that? The thing is I have a web application, certain pages make w3wp.exe grow ...

热门标签