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

前端 未结 4 406
孤城傲影
孤城傲影 2020-12-19 17:59

For some reason every 3-5 days our web app loses the ability to open a connection to the db with the following error, the strange thing is that all we have to do is reboot t

相关标签:
4条回答
  • 2020-12-19 18:26

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

    0 讨论(0)
  • 2020-12-19 18:32

    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.

    0 讨论(0)
  • 2020-12-19 18:36

    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.

    0 讨论(0)
  • 2020-12-19 18:41

    " 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.

    0 讨论(0)
提交回复
热议问题