3
votes

We're experiencing CPU spikes on our Azure App Service Plan for no obvious reason. Its not something that stops the service, but we'd like to have an understanding of when&how that kind of things happen.

For example, CPU percentage sits at 0-1% range for days but then all of the sudden it spikes to 98%, 45%, 60% and comes back to 0-1% range very quickly. Memory stays unchanged at comfortable 40-45% level, no incoming requests to it, no web jobs, nothing unusual in logs, no failures, service health ok, nothing we could point our finger to as a reason. We tried to find out through kudu > support > analyze (metrics)...but we couldn't get request submited. It just keeps giving error to try later.

There is only one web app running in that app service plan, its a asp.net core 2.0. web api.

Could someone shed some light on this kind of behavior? Is this normal, expected? If so, why it happens? Is there a danger that it spikes to 90% and don't immediately come back?

Just, what's going on?

1
I can only answer part of this question: it is NOT normal. I haven't seen random unexplained CPU spikes like that on my Web App instances. What's your pricing tier and instance size? Do you by chance have any site extensions running? There's no PHP apps running around like a WordPress blog? How long does this spike last?Rob Reagan
Pricing tier is Basic, instance size is B1, the first one in Basic tier. No site extensions running, no blogs, phps, anything like that. Just a single asp.net core rest web api running in it.Its hard to tell how long spike lasts because chart doesnt show below 1 minute granularity but its below one minute.dee zg
I thought i did 5 times, i have spent 3 hours looking through all i could think of. Will do one more time to triple check and come back here with results.dee zg
@RobReagan yes, that is one option i also had on mind, definitely. Holidays & weekend are a lucky circumstance now as there will be no traffic but i'd still like to get some understanding behind it. Will keep post here about findings.dee zg
@RobReagan Here is the response from MSN support: "We reviewed our internal tools taking as starting point 12/26 and today 12/29 and we could notice that this was majority System processes doing background tasks, which is normal for each sandbox environment. In your case, it was mostly MonAgentCore.exe fluctuating in CPU which is our diagnostic log capturing process and this looks like a very temporary spike and appears normal." / So, seems to be normal thing on App Service platform and a part of their monitor tools.dee zg

1 Answers

5
votes

After speaking with MS support i've got an answer it is a normal behavior coming from their monitoring tool:

We reviewed our internal tools taking as starting point 12/26 and today 12/29 and we could notice that this was majority System processes doing background tasks, which is normal for each sandbox environment. In your case, it was mostly MonAgentCore.exe fluctuating in CPU which is our diagnostic log capturing process and this looks like a very temporary spike and appears normal.