Asp.net 奇怪的连接超时问题

Asp.net 奇怪的连接超时问题,asp.net,database-connection,Asp.net,Database Connection,我有一个ASP.NET站点在IIS7上运行,在午夜,大约5-7分钟,我的站点出现以下错误: Error Caught in Application_Error event Exception type: System.Net.Sockets.SocketException Error in: (url with different withint the site) Error Message: A connection attempt failed because the

我有一个ASP.NET站点在IIS7上运行,在午夜,大约5-7分钟,我的站点出现以下错误:

    Error Caught in Application_Error event

Exception type: System.Net.Sockets.SocketException
Error in:   (url with different withint the site)


Error Message:  A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

Stack Trace:

   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)

Additional infomation:

Physical path:  d(url with different withint the site)
Raw url:    /Default.aspx
Request type:   GET

谷歌没有提供关于这个问题的有用信息,我自己也无法准确理解代码中的哪些地方会发生这种情况,特别是因为这种情况每天只发生几分钟,大约在午夜后30分钟。

这并不是很多信息,但如果它是按照可预测的时间表发生的,也许你的应用程序池是按计划回收的,而你有一些长时间运行的代码,但不知何故没有被正常关闭?或者,你正在与另一个网站进行通信,而他们在这段时间内关闭了网站,或者速度太慢了

尝试调查数据库服务器是否具有非活动超时设置。您可能需要为数据库驱动程序/连接池配置保持活动状态,或在每次实际查询之前强制执行测试查询,以确保在需要时建立连接。

可能的默认appdomain回收?aps.net每天至少回收一次。虽然几分钟似乎很长。。。