解决 ASP.net 可能的内存泄漏问题
我们的某个 Web 应用程序似乎可能存在内存泄漏。 w3wp.exe 占用了大约 1.5GB 的 RAM,我们的 Web 服务返回一个错误,指出内存不足。有没有办法确定哪个应用程序导致内存过多或分析正在运行的网站以查看内存问题的原因是什么?
我会将其发布在服务器故障上,但我更感兴趣的是调试应用程序以查看故障所在的方法。我可以在本地运行网站,并且 w3wp.exe 不会占用过多的 RAM。这些是经常使用的活跃网站/网络服务,因此我假设该问题只会在负载过大时才会出现。
It looks like there is a possible memory leak with one of our web applications. w3wp.exe is taking about 1.5gb of RAM and our web services are returning an error saying that it is out of memory. Is there a way to determine which application is causing the excessive memory or profile the actively running websites to see what the cause of the memory issue is?
I would post this on Server Fault, but I am more interested in a way of debugging the application to see where the fault is. I can run the websites locally and w3wp.exe does not take excessive amounts of RAM. These are active websites / web services that are in constant use, so I am assuming that the problem will only show up with excessive load.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以尝试使用Red Gate 的内存分析器。
尝试猜测应用程序中的内存泄漏将花费很长时间。分析工具将准确地向您显示问题所在,而无需进行所有烦人的尝试和错误。
You could try a copy of Red Gate's Memory Profiler.
Trying to guess the memory leak in your app will take forever. A profiling tool will show you exactly where the problem is without all the pesky trial and error.
观看 本集 dnrTV 与 Tess Ferrandez 一起获取有关使用 WinDBG 和其他工具分析内存转储的一些指导 - 她让它看起来非常简单!
Watch this episode of dnrTV with Tess Ferrandez for some pointers on using WinDBG and other tools to analyze a memory dump - she makes it look really easy!
调试诊断工具包 正是为此目的而设计的。
有很多关于如何使用该工具包的文章:
The Debug Diagnostics Toolkit is designed exactly for this purpose.
There are a fair few articles around on how to use the toolkit: