Azure web app with python, vizplugins keep wasting cpu time.

尤健弘 0 Reputation points

User's image


After initiating the request, the application continues to use the CPU for about an hour.

However, I did not encounter this situation (continuous CPU usage) during local testing. Therefore, I used the py-spy tool in the SSH terminal interface to test and found a function called "vizplugins", which was not present during local testing. What is the function of this function? Is there any way to prevent it?

It is worth noting that this situation did not exist about half a year ago. Did Azure App Service make any changes recently?


Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,000 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 15,946 Reputation points Microsoft Employee


    Thanks for reaching here!

    If I have understood right it seems like the continuous CPU usage issue in your Azure web app is related to the "vizplugins" function.

    • "vizplugins" is not a standard Python function, so it's possible that it's a custom function that's been added to your application.
    • AFAIK "vizplugins" is a function that's used to visualize data or to generate graphs or charts.
    • To prevent this function from using excessive CPU resources, you could try optimizing the code or reducing the complexity of the visualization process. This might involve reducing the number of data points being visualized, using more efficient algorithms, or caching the results to reduce the number of calculations required.
    • As you mentioned that the issue did not exist previously so it might be helpful to review any recent changes to the code or to the Azure environment to determine if there are any potential causes for this issue.
    • See this document might help:

    Further looking at your app, there is too many actively running containers (>=10) detected leading to high CPU usage.

    You may want to know that the App Service Linux and Web App for Containers uses Docker. The App Service and underlying features each run within their own containers.

    Below is additional information regarding this topic.

    1. Each App will have a corresponding Kudu site which is used for deployment and troubleshooting.
    2. If CORS or Authentication features are used by the App, another middleware container will be added to support the feature.
    3. If Managed Identities is used, a separate container will be added.
    • So for each App running on an App Service Plan, it could be possible for up to four (4) containers to be running depending on the features which are enabled.
    • As your current ASP is LinuxFree , Would recommend you to split up your apps and move them to another App Service plan or scale up App Service plan.


    To move an app to another App Service plan, follow these steps.

    1. In the Azure portal, search for and select App services and select the app that you want to move.
    2. From the left menu, select Change App Service plan.
    3. In the App Service plan dropdown, select an existing plan to move the app to. The dropdown shows only plans that are in the same resource group and geographical region as the current App Service plan. If no such plan exists, it lets you create a plan by default. You can also create a new plan manually by selecting Create new.
    4. If you create a plan, you can select the pricing tier of the new plan. In Pricing Tier, select the existing tier to change it.
    5. If you're moving an app from a higher-tiered plan to a lower-tiered plan, such as from D1 to F1, the app may lose certain capabilities in the target plan.
    6. When finished, select OK.

    Reference: Manage App Service plan ; App Service Plan overview

    Hope this helps, Let us know.


    0 comments No comments