开发者

weird connection timeout issue

I have an ASP.NET site running on IIS7 and in the midnight, about 5-7 minutes my site is down with the following error:

    Error Caught in Application_Erro开发者_开发问答r 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

Google does not say very usefull info on this issue and nor myself cannot understand exactly where in the code this can happen especially because it's only happening a few minutes per day only, about 30 minutes after midnight.


That's not a lot of information to go on, but if it's happening on a predictable schedule like that, perhaps your app pool is being recycled on a schedule, and you've got some long-running code that isn't being shut down gracefully somehow? Or perhaps you're doing some communication with another site and they're shutting down or slowing down too much around that time?


Try investigating if the database server has an inactivity timeout setting. You may need to configure the database driver/connection pool with a keep-alive or force a test query prior to each real query to guarantee the connection will be established when needed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜