Azure App Service "Production Breakpoints" errors

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.

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

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

CNamedPipe::Read - Read from named pipe failed: 0x8007006D.
IfFailRet(pNamedPipe->Read((BYTE*)&controlRequest, sizeof(SnapshotHolderControlStruct))) failed in function CSnapshotHolder::HandleNewPipeConnection: -2147024787
CInstrumentationMethod::Initialize - failed to initialize instrumentation method PID: 12196 hr: 80131375 name: Production Breakpoint Instrumentation Method

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.

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.

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. 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.

Solution :

Remove the unnecessary application settings that somehow mess up the app service

Click App Service, then Navigate to Configuration (under the Settings)

Remove the property called SnapshotDebugger_EXTENSION_VERSION

Hit Save

Optional : Navigate App Service-Extentions. and if you have Application Insights extension installed, remove it.

Thank you Antti K. Koskela for this article :