我有一個Azure SQL數據庫支持我的webapp。Azure SQL超時
坐在虛擬目錄中有一個Web API 2.0。
我的網絡應用程序做一些輕量級的數據庫的東西,API負責輸入數據,而webapp部分是供用戶登錄和查看他們跟蹤的電子郵件數據。
很簡單的東西。
現在問題似乎是db。我不斷收到這些討厭的Sql Timeout錯誤。
奇怪的是,它始終是相同的錯誤。我應該提到webapi
是使用NHibernate構建的。門戶網站主要是使用Code First的實體框架。
我已經聯繫了一些來自Microsoft的SQL「專家」,他們向我提供的唯一有用的信息是,他們指出,每當我得到這些間歇性超時錯誤時,「writelog」已經升高立即。
現在這提出了一個問題,因爲我不知道如何診斷這個問題。
我正在粘貼「通用」堆棧跟蹤,以便我可以從這裏的任何人那裏獲得一些有用的信息,他們是SQL Azure專家。
堆棧跟蹤:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. This failure occurred while attempting to connect to the routing destination. The duration spent while attempting to connect to the original server was - [Pre-Login] initialization=2; handshake=9; [Login] initialization=0; authentication=0; [Post-Login] complete=1; ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action 1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)...
`
您是否實施了重試策略? – CSharpRocks
還沒有,我認爲'Resiliency'是爲了幫助在Azure中彈出的「瞬態」錯誤? –