AppInsights logo

How to fix weird “Production Breakpoints” errors in an Azure App Service?

This post was most recently updated on November 28th, 2021.

3 min read.

This article describes a curious fix I found to an issue where Application Insights (seemingly) crashes your Azure App Service, leaving behind interesting, yet non-descriptive errors in the Application Event Logs.

The actual symptoms might be your Azure app service just timing out with no errors being surfaced on the front-end. Frustrating.

Problem

Does your Azure App Service’s event log look like this? Full of “Production Breakpoints” with weird errors about named pipes?

Azure App Service diagnostic log full of "Production Breakpoints" -error.. What gives?
Azure App Service diagnostic log full of “Production Breakpoints” -error.. What gives?

In my case, the errors were something like these below:

IfFailRet(pNamedPipe->Read((BYTE*)&controlRequest, sizeof(SnapshotHolderControlStruct))) failed in function CSnapshotHolder::HandleNewPipeConnection: -2147024787

And:

CNamedPipe::Read - Read from named pipe failed: 0x8007006D.

Or:

CInstrumentationMethod::Initialize - failed to initialize instrumentation method PID: 12196 hr: 80131375 name: Production Breakpoint Instrumentation Method

Or something along those lines anyway.

What do?


These errors would always pop up at the same time the site would crash under fairly meager load. In one case, any user would crash the site. In another, a hundred or so RPS (requests per second) would completely destroy a site that’s supposed to be able to handle tens of thousands.

Impossible to tell whether the errors were logged because of the crash, or the app service crashed because of the same thing that caused the errors…

Reason

After a quick investigation, Application Insights seemed to be the source (“Production Breakpoints”) for the error. I had never heard of AppInsights crashing an App Service, but we did eas

This didn’t completely remove the issue, but did stabilize the app service. But how to get rid of the errors for good?

There’s a simple fix, though! Or at least there was for me. Maybe it’ll help you as well!

Earlier, when I had first had Azure DevOps enable “Monitoring”, it would install AppInsights extension to the Azure App Service website.

That’s a horrible mistake. Don’t do that.

The extensions are extremely fragile. I’ve posted about that earlier: You wouldn’t believe these 3 solutions to fix the error “500.32”, and what they look like now!

You might’ve also enabled these extensions by clicking the tempting buttons in Azure Portal. That might be a mistake as well.

Anyway – the extensions are kind of wild as they also add random application settings to your app service. And these settings have side effects – like in this case!

I had removed the extension, and we were using AppInsights with the SDK, i.e. without anything extra installed on the Azure App Service. But uninstalling the extension does not remove its Application Settings – which makes sense, because they DO have side effects, so you can’t really remove them, because some other functionality might be using them as well!

Oh, what fun.

Solution

This time, the solution was basically just a clean-up task: remove the unnecessary application settings that somehow mess up the app service. See below on how to do that!

Time needed: 5 minutes

How to fix “Production Breakpoint” errors in Azure App Service?

  1. Open Azure Portal

    Click 👉 https://portal.azure.com/

  2. Find your Azure App Service instance

    You should probably know it by name, url, or at least the resource group in which it’s residing.

  3. Navigate to “Configuration”

    Find it under “Settings” – like shown below:

  4. Remove the property called “SnapshotDebugger_EXTENSION_VERSION”


  5. Hit Save

    Your app service will restart – and should work.

  6. (OPTIONAL): If you’re using the SDK, get rid of the App Service extension!

    Navigate to App Service > Extensions – and if you have Application Insights extension installed, remove it. If you’re using the AppInsights SDK in your code, that is.

And with any luck, you’re good.


Did it work for you? Let me know in the comments -section below!

mm
4.5 2 votes
Article Rating
Subscribe
Notify of
guest

5 Comments
most voted
newest oldest
Inline Feedbacks
View all comments