2016-08-01 96 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,通常是间歇性的网络问题,通常是对等连接,数据中心之间等等。