Application insights site extension in Azure causing high CPU usage with spikes? - azure-application-insights

After enabling Application Insights site extension in Azure (without doing any code level updates) for an app service the CPU for the app service plan goes up:
After disabling the Application Insights from each app service (and removing Application Insights applications) CPU gets back to normal
What could be the reason for this and how to troubleshoot the issue?
The app service plan is a P3V2 (840 total ACU, 14 GB memory, Dv2-Series compute equivalent). It runs both .NET Framework and .NET Core app services.

Related

ASP.NET Monitoring and logging

Is there any service similar to Application Insights and Application Monitoring which Azure provides which I can install in my own server and is free for small uses?

IIS Dotnet 6 Web Api has a HttpRequestException every morning

I have a .Net 6 Web Api that uses the PnP Core Sdk to communicate with a Sharepoint Online Server (365 Cloud). The Web Api is registered in AAD, has Application permissions for the Sharepoint Rest Api / MS Graph and uses a Certificate for authorization. When I run the process as a user it works for several days without issues, but when I deploy it with IIS 10 on Windows Server 2016 Datacenter I get a HttpRequestException every morning and have to manually recycle the application pool or restart the Application. Otherwise it does not work anymore. I have attached the logs for the exception. I am not very familiar with IIS and are not able to resolve the error. Can somebody provide help?

Can Azure Application Insights be used on applications not hosted in Azure?

Is it possible for me to add Application Insights to a .NET application that we host in our local environment for monitoring within Azure, or does Application Insights only work for applications hosted on Azure?
You can monitor any kind of app anywhere with Application Insights, as long as the thing being monitored can send outbound telemetry to application insights. the ip addresses for application insights are documented here if this requires setting up any kind of firewall/etc rules.
Azure is the "storage location" for your telemetry. Your app doesn't have to run in Azure, or even be a web app. people use application insights for console apps, device apps powershell scripts, web apps hosted all over the place, etc.

Asp.Net Core Get Server Hardware Usage

I'm created an asp.net core web api application.
I want to get current server cpu/ram usage as percent.
This application is will not scale never and this anytime will running on the one Windows server.
How can i get the server cpu/ram usage as percent?

IIS6 | Application Pools | ASP.NET Framework

In IIS6 it's possible to have more than one ASP.NET application running in the same application pool. This is fine, except that there is nothing in IIS6 that prevents you from running multiple .NET versions in the same pool.
When you create application pools in IIS7 you must explicitly state was .NET version will be running in that pool. Running multiple .NET versions in IIS7, in the same application, is impossible.
How can I enforce such rules on my IIS6 server in order to prevent my deployment team from creating such problems?
What I do:
Step 1. Create the following application pools:
.NET 1.1 Apps
.NET 2.0 Apps
Step 2. Disable the "Default App Pool"
Now, any time a new application is configured in IIS, it will not work right away because the default app pool is disabled. This forces the person configuring the application to select an app pool that is appropriate for the .NET framework version of the app.
We tend to use one application pool per site, so that each application is isolated in its own process space. Application pool recycles will only affect a single application, and each worker process ends up with its own 4gb memory space. Badly programmed applications have no chance of affecting other applications, resulting in a highly isolated deployment model.
We've also standardized on x64 OS builds running 32bit application pools. While there is overhead using this technique since each application ppol contains a separate copy of the .Net framework, we feel that the added granularity of the application space adds stability to our deployments. You also get the ability to run each application as it's own domain identity, allowing for further memory space isolation and eliminating any need for identity impersonate in web configs.
With IIS 7, you have the ability to run each application pool as either 32 bit or 64 bit, so you can run large memory applications in 64 bit application pools. IIS 7 application pool security is also much more simplified.
I don't think you can. What I do is name my app pools in IIS 6 so that they show what .Net version they host. That way it's easy to pick the correct app pool when creating a new application.
If I remember correctly, you can also setup application pools in IIS6 (Windows 2003). Create one application pool per framework version in use.
I am not aware of any possibility to enforce the version of the .NET framework being used by an application. If you have setup an application pool to use .NET 1.1 and you have a .NET 2.0 application running in that application pool, you will get an exception in the application (yellow screen of death), since it will not find some referenced assemblies and classes.

Resources