0

We have just added Application Insights to our application and while monitoring requests, failures and exceptions all makes sense, the Dependency stats.

There are over 9000 items in our Total of Dependency calls by Dependency table for less than 250 requests. I'm sure that the app (which uses Entity Framework) has not issued 9000 sql calls for these almost 250 requests.

When I try to drill down into the individual items I can only see that the Dependency type is SQL, as shown below.

Could someone help me understand this more?

enter image description here

tymtam
  • 31,798
  • 8
  • 86
  • 126
  • Also, you may want to install Status Monitor - as explained here: https://azure.microsoft.com/en-us/documentation/articles/app-insights-asp-net-dependencies/. This will surface the actual SQL commands being sent. – Oleg Ananiev Sep 28 '16 at 12:09

1 Answers1

2

Seems like Application Insights has surfaced a real issue with your DAL. Naturally it would take looking into your code to confidently determine what's going on. My best guess is that your code suffers from the N+1 Selects anti-pattern, which is a very common pitfall when using Entity Framework.

You can read more about N+1 Selects and EF here.

Community
  • 1
  • 1
FrictionFree
  • 111
  • 3