Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I view the number of pooled ADO.NET database connections in an Azure App Service?

I am having problems with the number of pooled connections in my Azure web app. And it will help me a lot if I can see the number of pooled connections so I can understand how it relates to the application usage.

On classic Windows machines I can view the ADO.NET performance counter "NumberOfPooledConnections" using the "Performance Monitor" tool. But I could not figure out how to do the same thing when I am using an Azure App Service.

like image 794
Bassem Avatar asked Nov 08 '22 21:11

Bassem


1 Answers

Unfortunately, performance counters are not supported on Azure App Services due its multitenant nature of it.

See: Access performance counter programmatically in Microsoft Azure web app

Three things that you may want to try however is:

  1. Enable Application Insights (https://learn.microsoft.com/en-us/azure/application-insights/app-insights-performance-counters) or New Relic.

  2. If your application is for test purpose, I can also suggest to deploy to cloudservice where you will have access to the full VM and traditional Perf counter

  3. Try deploying to App Service Environments & I believe you will get access thru programmatically at least. This does get expensive.
like image 107
Umang Avatar answered Nov 15 '22 06:11

Umang