[HostMonitor] Host CPU threshold exceeded

Thomas Ligon (Office 365) 26 Reputation points
2022-09-29T15:01:03+00:00

I am using Azure Functions to run a Python app that reached the limits of my old desktop PC (16GB RAM). The app does some complex symbolic math and has reached the point where Resource Monitor showed memory saturation. Due to request timeouts, I moved from a Consumption Plan to Premium. Now, the troubleshooting feature Diagnose and Solve Problems / Availability and Performance shows
[HostMonitor] Host CPU threshold exceeded (94 >= 80)

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,374 questions
0 comments No comments
{count} votes

7 answers

Sort by: Most helpful
  1. Thomas Ligon (Office 365) 26 Reputation points
    2022-10-06T20:12:36.36+00:00

    I have done more experimentation, where it looked as if the memory working set were changing, but it isn't.
    PYTHON_THREADPOOL_COUNT is now set to 20.
    PYTHON_THREADPOOL_COUNT is set to 30.
    I still get [HostMonitor] Host CPU threshold exceeded (93 >= 80).


  2. Thomas Ligon (Office 365) 26 Reputation points
    2023-09-14T20:00:16.0933333+00:00

    Hello Kyle,

    the solution I ended up using won't help you direclty, but I will tell you about it anyway. I was looking for a way to improve the performance of an application I wrote on my PC, which ran into a memory limitation. I was doing symbolic math and the memory required was growing exponentialy with the key parameter. That is to be expected and if I had a way to improve the math I would have done that a long time ago.

    My first attempt was Azure Virtual Machine, but I was totally confused by the huge number of possibilities and looked for some advice. One response was to try Azure Functions and it really sounded like a nice solution. But, as it turned out, Azure Functions not only provides a higher level of service than VMs, it is also great at scale out, which makes it a good fit for web apps. However, I was not looking for scale out or high availability, but pure scale up.

    So, I got some more good advice and went back VMs. For my need, that was the better solution.

    Now you can probably see that this request comes from my attempts to scale an Azure Function up. Many of those requests need to be handled by support, so that the administration has control of resources. Support was very helpful to me and I think it might be the best path for you.