0

I am using Azure App Service which hosts application that reads data from Event hub using EventProcessorHost. I have allocated 6 instances(Manual Scaling) to run. I checked the Metrics(CPU Time) in App Service and found only 5 instances are running.

I am getting different instances count for different metrics. Data In metrics shows 6 instances while CPU Time metrics shows 5 instances. I am confused. Please suggest.

enter image description here enter image description here Regards, Amit Agrawal

Amit Agrawal
  • 51
  • 2
  • 16
  • Do you have *always on* enabled? – Alex AIT Mar 21 '20 at 10:54
  • How many partitions does the Event Hub that you're reading from have? Since the processor instances don't guarantee a fair split of the work (though they do their best to achieve it), it is possible that one of your instances simply doesn't have enough work and is spending a large portion of its time idle. – Jesse Squire Mar 21 '20 at 12:19
  • @JesseSquire - Event Hub has 32 partitions – Amit Agrawal Mar 21 '20 at 16:13
  • @AlexAIT - What is Always on enabled feature ? – Amit Agrawal Mar 21 '20 at 16:14
  • 1
    "Always On: Keep the app loaded even when there's no traffic. It's required for continuous WebJobs or for WebJobs that are triggered using a CRON expression." https://learn.microsoft.com/en-us/azure/app-service/configure-common – Alex AIT Mar 21 '20 at 16:17
  • @AlexAIT- Yes, Always on is enabled. – Amit Agrawal Mar 21 '20 at 16:26
  • Have you tried capturing the processor logs on that instance to see the operations attempted and the result? That may help to provide some insight on whether it isn't running or there is a problem interfering with it taking ownership of partitions? The event source for the logs can be found here: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/eventhub/Microsoft.Azure.EventHubs.Processor/src/ProcessorEventSource.cs – Jesse Squire Mar 21 '20 at 17:24
  • @JesseSquire - Please suggest how to see processor logs? – Amit Agrawal Mar 21 '20 at 17:26
  • I'd suggest investigating the EventListener in .NET, which would allow you to hook the EventSource. https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.tracing.eventlistener?view=netcore-3.1 – Jesse Squire Mar 21 '20 at 18:22

1 Answers1

1

the AlwaysOn feature is used to keep your app loaded, particularly when it's not receiving any traffic.

However, I am aware of numerous instances of AppServices, across a number of Azure Regions, where the metrics were showing the instance count different to the number of instances deployed. This was since yesterday. I believe there have been underlying Azure issues.

In the Azure Portal, under the menu for your WebApp, you should be able to see the recent health of your WebApp within the 'Resource Health' section.

I would advise that you raise a ticket with Microsoft, just to be sure.

#azurefamily