Strange intermittent SQL connection error, fixes on reboot, comes back after 3-5 days (ASP.NET)

心不动则不痛 提交于 2019-11-29 11:46:50

The number of allowed connections to sql server is a fixed resource. It sounds like you have code somewhere that isn't closing it's connection correctly, and after a period you can't open any more new ones.

We recently faced a similar issue in our production environment and after many rounds of "debugdiag"ging and analyzing the dumps we came to the conclusion that a largely fragmented large object heap was causing this. Ref http://msdn.microsoft.com/en-us/magazine/cc534993.aspx. In short, your application might have run short of memory and didn't have enough contiguos space left to open connections. You can use VMMap http://technet.microsoft.com/en-us/sysinternals/dd535533 for the purpose of identifying available free space. Are you recycling your AppPools regularly? AppPool recycle tears down the application and frees up any help memory hence, resolves any related issues.

Have you tried collecting basic information with perfmon and profiler (trace) to see how many connections are made, memory stats and other interesting things?

" I have noticed a lot of ANONYMOUS LOGONs in the security log in the middle of the night from our AD server which is strange, and also some from an IP in Amsterdam."

Sounds as if you could possibly have someone trying to break into your system and maybe these are the connections that aren't closing. I like the suggestion of using perfmon and profiler to see the problem.

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