w3p.exe 由于堆栈溢出而终止 - 如何追踪问题?
我们在生产中遇到堆栈溢出 ~ 2-4 次/天
我们无法在开发环境中重现这一点,鉴于这是一个 Web 应用程序,任何时候可能有大约 100 个并发用户,我正在努力弄清楚如何解决最好追踪到这一点。
无论如何,是否可以从事件查看器获取更多信息 - 很高兴安装某种形式的侦听器工具 - 即使我只能获取线程标识(设置为当前用户),这会有所帮助 - 尽管 dll + 类/函数 woudl太棒了!
或者这只是挖掘、尝试重现或添加一些跟踪的问题?
we are getting a stack overflow in production ~ 2-4 times / day
We cannot reproduce this is in dev environment, nad given this is a web app with probably ~100 concurrent users at any one time, I'm struggling to work out how best to track this down.
Is there anyway to get any more info from event viewer - happy to install some form of listener tool - even if i can just get teh thread identity (set to the current user) that'll help - although the dll + class / function woudl be great!
Or is it just a matter of digging, trying to reproduce or adding some tracing in??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以在生产 IIS 上运行一个 IISDiag 工具来分析崩溃情况。这里有一些信息:
http://support.microsoft.com/kb/919790
这不仅仅是为了泄漏——它会转储类似 CORE 文件之类的内容,您可以稍后进行分析。
There is an IISDiag tool that you can run on production IIS to analyze crashes. Some information here:
http://support.microsoft.com/kb/919790
It's not just for leaks -- it dumps something like a CORE file that you can analyze later.
使用 Elmah 进行异常日志记录。使用 Elmah 添加未处理异常的日志记录只需将程序集放入应用程序 bin 文件夹中,并在 Web 配置中添加 Elmah 部分以实现基本日志记录场景。
如果日志不足以确定错误源,您可以使用 DebugDiag。 此处提供了有关如何使用它的指南。
Slap on Elmah for exception logging. Adding logging of unhandled exceptions using Elmah only require you to drop in the assembly into the application bin folder and to add Elmah section in the web config for a basic logging scenario.
If the logs is not enough to determine the error source you can create memory dumps of the state of the failing application using DebugDiag. There is a guide on how to use it here.
您可以将全局异常处理程序放入 global.asax 文件中。放入异常处理程序,然后将堆栈跟踪写入事件日志。 这篇文章对于如何做到这一点有一个很好的总结,尽管我相信还有很多其他的。一旦您知道错误发生在哪里,您就可以在发生错误的函数中添加一些额外的日志记录,并希望缩小范围,直到找到特定问题。
You can put a global exception handler in the global.asax file. Put an exception handler in and then write the stack trace to the event log. This article has a pretty good summary of how to do it though I'm sure there are a lot of others too. Once you know where the error is occurring you can put in some additional logging in the function that the error is occurring in and hopefully narrow it down until you find the specific problem.