简体   繁体   English

IIS连接池询问/泄漏跟踪

[英]IIS Connection Pool interrogation/leak tracking

Per this helpful article I have confirmed I have a connection pool leak in some application on my IIS 6 server running W2k3. 根据这篇有用的文章我已经确认我在运行W2k3的IIS 6服务器上的某个应用程序中有连接池泄漏。

The tough part is that I'm serving 300 websites written by 700 developers from this server in 6 application pools, 50% of which are .NET 1.1 which doesn't even show connections in the CLR Data performance counter. 困难的部分是我在这个服务器上的6个应用程序池中为700个开发人员编写了300个网站,其中50%是.NET 1.1,甚至在CLR Data性能计数器中都没有显示连接。 I could watch connections grow on my end if everything were .NET 2.0+, but I'm even out of luck on that slim monitoring tool. 如果一切都是.NET 2.0+,我可以看到我的终端连接增长,但我甚至在这个苗条的监控工具上运气不好。

My 300 websites connect to probably 100+ databases spread out between Oracle, SQLServer and outliers, so I cannot watch the connections from the database end either. 我的300个网站连接到可能在Oracle,SQLServer和异常值之间分布的100多个数据库,所以我也无法从数据库端看到连接。

Right now my best and only plan is to do a loose binary search for my worst offenders. 现在我最好也是唯一的计划是对我最糟糕的罪犯进行宽松的二元搜索。 I will kill application pools and slowly remove applications from them until I find which individual applications result in the most connections dropping when I kill their pool. 我会杀死应用程序池并慢慢从它们中删除应用程序,直到我发现当我杀死它们的池时,哪些单独的应用程序导致最多的连接丢失。 But since this is a production box and I like continued employment, this could take weeks as a tracing method. 但由于这是一个生产箱,我喜欢继续就业,这可能需要几周时间作为追踪方法。

Does anyone know of a way to interrogate the IIS connection pools to learn their origin or owner? 有没有人知道询问IIS连接池以了解其来源或所有者的方法? Is there an MSMQ trigger I might be able to which I might be able to attach when they are created? 是否有一个MSMQ触发器,我可能能够在创建它时附加它? Anything silly I'm overlooking? 我有点傻吗?

Kevin 凯文

(I'll include the error code to facilitate others finding your answers through search: Exception: System.InvalidOperationException Message: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.) (我将包含错误代码以方便其他人通过搜索找到您的答案:异常:System.InvalidOperationException消息:超时已过期。从池中获取连接之前已经过了超时时间。这可能是因为所有池连接都在已达到使用和最大池大小。)

Todd Denlinger wrote a fantastic class http://www.codeproject.com/KB/database/connectionmonitor.aspx which watches Sql Server connections and reports on ones that have not been properly disposed within a period of time. Todd Denlinger写了一篇精彩的课程http://www.codeproject.com/KB/database/connectionmonitor.aspx ,它可以观察Sql Server连接并报告一段时间内没有正确处理的连接。 Wire it into your site, and it will let you know when there is a leak. 将它连接到您的站点,它会在发生泄漏时通知您。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM