How to measure memory usage for a Live ASP.NET MVC web application?

為{幸葍}努か 提交于 2019-11-28 16:23:20

问题


So right off the bat, not sure if this question is better suited for another StackExchange site.

I've got an ASP.NET MVC 3 web application running on Windows Server 2008 and IIS 7.5

Site runs fine initially, but i can see the memory usage gradually growing. After about 12 hours it's nearly out of memory and the site chokes.

I'm using a lot of caching, so i'm thinking this combined with some possibly memory leaks is the cause of the issue.

So my question - what's the best way (tools, for example) to monitor memory usage on a web server running ASP.NET MVC?

In the past i've used good old' perfmon and put the IIS counters on to measure these things.

It this still the best way, and if so, can someone recommend a good perfmon counter template for my scenario?


回答1:


Perfmon's counters are still a good technique (and free!).

PAL (Performance Analysis of Logs), a free tool, has an ASP.NET perfmon counter template for general health (in addition to generating reports of counter log files based on thresholds).

Check out:

  • .NET Debugging Demos Lab 7: Memory Leak

  • .NET Memory Leak Case Study: The Event Handlers That Made The Memory Baloon

  • Tracking down managed memory leaks (how to find a GC leak)

  • Determine if your .NET Application has a Memory Leak

Commercial tools like MemProfiler, RedGate's memory profiling tool and JetBrains Profiler are all very good (and all have free trials).



来源:https://stackoverflow.com/questions/7681790/how-to-measure-memory-usage-for-a-live-asp-net-mvc-web-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!