Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.7k views
in Technique[技术] by (71.8m points)

c# - Reasons for pooled connection leak in ASP.Net

My application is working like a dream on a couple of boxes. But I am having an issue where I am encountering a pooled connection leak on one environment. Normally the assumption I make is that I am failing to close out the connection somewhere. But if this were the case then I'd be able to replicate the issue. It's connecting from C# asp.net 4 on IIS 7 or 8 to a Microsoft sql server. And every couple of days its running into an issue where I have to restart IIS to sever the connections because it has accumulated over 100(which is set as the max connection pool size). The load on the application is not such that it should ever be reaching that limit, so the only thing I can figure is that there is a leak caused by something particular to this environment related to their configuration.

At first I was thinking that it could be caused by the application running into a separate exception after it had opened the connection but before it had closed it. But this doesn't appear to be the case when I look through the logs, the exception that it cannot create a pooled connection comes out of nowhere.

Is there anything anyone knows of that could lead to this sort of leak maybe a networking issue that is preventing the connection from being closed. Or is there anything that could be misconfigured in IIS or with group policy settings?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...