Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Network path not found exception encountered randomly

Azure .NET MVC application is encountering an exception i.e. "The network path was not found"

Problem with the other queries that I searched before asking this question was that its not happening all the time, it's working as expected but this issue is occurring randomly like once every 15-25 days. It has been roughly 50 days since deployment of application on production and encountered this twice, while did not encounter this on Azure UAT environment(where low numbers of users were present).

Issue is temporarily resolved by IIS reset using the command: iisreset

Source Error:

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.

Stack Trace:

[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)]

Any idea?

like image 414
CodeGifts4All Avatar asked Aug 01 '16 10:08

CodeGifts4All


1 Answers

Checklist:

  1. Can you isolate the problem? If you have two web servers and one db, for example, when it happens does it happen on both web servers at the same time?

  2. Set up monitoring of all critical network paths. Start monitoring possible causes (DHCP leases, even if you get a static IP from the server, would be one of the first).

  3. Log as much information as possible. Can you determine if you are getting an ICMP error from a router or an issue from a host?

These things are, IME, usually intermittent network issues and often on peering connections, between data centers, and the like.

like image 72
Chris Travers Avatar answered Sep 21 '22 14:09

Chris Travers