Why is Thread Count metric always 0 for Linux App Service with python runtime?

M. Vaihinger 45 Reputation points

I was recently checking the metrics of our Linux App Services and noticed that the Thread Count metric is constantly 0 in all apps even though we configured the programs to use multiple threads. I did expect to see non-null values. Azure docs states:

The number of threads currently active in the app process.

So now I am wondering whether I don't understand the meaning of the metric, whether this metric only works for Linux Web Apps or whether there's some problem in our system configuration. Any support is highly appreciated! Further details on the system: We have multiple App Services running in Linux App Service Plans (P2v2, B3). The apps are using Python 3.8 + Django 3.2 and are served using gunicorn (both sync and async config).

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

Accepted answer
  1. Grmacjon-MSFT 12,961 Reputation points

    Hi @M. Vaihinger ,

    Thank you so much for your patience. You are seeing a 0 for this metric because the Thread Count metric in Azure App Service is not currently supported for Linux App Services.

    The Thread Count metric is only supported for Windows App Services. For Linux App Services, you can use other metrics such as CPU usage, memory usage, and request count to monitor the performance of your app.

    I have shared your feedback with the doc team so that the document you shared can be update with a note that states Thread Count metric is not supported for Linux App Services. You can track it here: https://github.com/MicrosoftDocs/azure-docs/issues/109002

    Hope that helps. please let us know if you have further questions or feedback.



    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful