2016-08-01 61 views
8

Azure的.NET MVC應用程序遇到異常即 「網絡路徑找不到」找不到網絡路徑異​​常遇到隨機

問題與其他疑問,我問這個問題之前,搜索是其沒有發生一直在按預期工作,但這個問題隨機發生,如每15-25天一次。自部署生產應用程序以來已經過了大約50天,並且遇到了這個問題兩次,但在Azure UAT環境(用戶數量較少的環境)中沒有遇到這種情況。 IISRESET

源錯誤:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

堆棧跟蹤:

[Win32Exception (0x80004005): The network path was not found]

[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]

任何想法

問題是暫時解決IIS使用命令復位?

+1

只是要清楚 - 此應用程序在Azure上運行,試圖訪問也在Azure上託管的數據庫?你介意分享連接字符串嗎?但請混淆敏感的部分。 – cdonner

+3

這聽起來像是一個間歇性的網絡問題。你如何監測網絡?如果您不是,請使用像Wireshark這樣的應用程序來監視網絡流量並報告您所看到的錯誤。 –

+1

這取決於你正在使用的框架等,但看看:http://social.technet.microsoft.com/wiki/contents/articles/4235.retry-logic-for-transient-failures-in-windows- azure-sql-database.aspx – Wurd

回答

1

清單:

  1. 你能找出問題?例如,如果您有兩個Web服務器和一個數據庫,那麼它在兩個Web服務器上同時發生?

  2. 設置監控所有關鍵網絡路徑。開始監控可能的原因(DHCP租約,即使您從服務器獲得靜態IP,也是第一個)。

  3. 記錄儘可能多的信息。您可以確定您是否從路由器收到ICMP錯誤或是否收到來自主機的問題?

這些東西是IME,通常是間歇性的網絡問題,通常是對等連接,數據中心之間等等。

相關問題