# APM hangs application #1724

**URL:** <https://discuss.elastic.co/t/apm-hangs-application-1724/321836>\
**Category:** APM\
**Tags:** dotnet, language-clients\
**Created:** [December 22, 2022, 12:00pm UTC](https://discuss.elastic.co/t/apm-hangs-application-1724/321836 "2022-12-22T12:00:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PedroBrasilBorges](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pedrobrasilborges/32/111812_2.png) [@PedroBrasilBorges](https://discuss.elastic.co/u/PedroBrasilBorges)\
**Post date:** [December 22, 2022, 12:00pm UTC](https://discuss.elastic.co/t/apm-hangs-application-1724/321836/1 "2022-12-22T12:00:58Z")

</div>

**Kibana version** :

**Elasticsearch version** :

**APM Server version** :

**APM Agent language and version** : 1.19.0 - dotnet

**Browser version** : 108.0.5359.125 - chrome

**Original install method (e.g. download page, yum, deb, from source, etc.) and version**: nuget

**Fresh install or upgraded from other version?** fresh

**Is there anything special in your setup?** no

**Description of the problem including expected versus actual behavior. Please include screenshots (if relevant)**:  
Working in .net core locally I had an issue stated in #1724, the application would hang because of the CPU metrics not being captured. After some search on the forums and on github I found that I could add the PerfomanceCounter key and some CPU values and the service would work fine. After the v.1.16.0 update I stopped needing to add this values on the configuration at all. Now I'm working on .net framework 4.6.2 service and the problem appeared again. If I add the new DisableMetrics setting to disable the cpu metrics the service stops hanging. Was this not added to .Net framework?

**Provide logs and/or server output (if relevant)**: where are apm logs being saved?

---

<div class="post-metadata">

**Author:** ![Wolfgang\_Ziegler](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfgang_ziegler/32/109929_2.png) [@Wolfgang\_Ziegler](https://discuss.elastic.co/u/Wolfgang_Ziegler)\
**Post date:** [December 22, 2022, 12:46pm UTC](https://discuss.elastic.co/t/apm-hangs-application-1724/321836/2 "2022-12-22T12:46:22Z")

</div>

Hi Pedro,

could you collect and attach agent logs (with log level `Trace`)?  
See here: [Troubleshooting | APM .NET Agent Reference [1.x] | Elastic](https://www.elastic.co/guide/en/apm/agent/dotnet/current/troubleshooting.html)

Thanks  
Wolfgang

---

<div class="post-metadata">

**Author:** ![PedroBrasilBorges](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pedrobrasilborges/32/111812_2.png) [@PedroBrasilBorges](https://discuss.elastic.co/u/PedroBrasilBorges)\
**Post date:** [December 23, 2022, 11:14am UTC](https://discuss.elastic.co/t/apm-hangs-application-1724/321836/3 "2022-12-23T11:14:29Z")

</div>

Helllo Wolfgang,

Here is the logs.

 ![log0](https://us1.discourse-cdn.com/elastic/original/3X/4/3/4368a523aa472661bd02fbc58d55dee9cbc9c465.png)  
 ![log1](https://us1.discourse-cdn.com/elastic/original/3X/1/5/155e8203addcb89db20aeb03e342cd1d1141de2e.png)  
 ![log2](https://us1.discourse-cdn.com/elastic/original/3X/2/b/2b7cc8a4f73921f20292411b4e31fd711a201678.png)  
 ![log3](https://us1.discourse-cdn.com/elastic/original/3X/9/8/982a0d2a76bb2a7716b848259a78e30612414a74.png)  
To note that we have the ElasticModule on the Web.Config, but add in the Global.asax a filter to remove the swagger calls. On this last image we see that I called the endpoint and got Outcome=Unknown. After this no more logs from APM, but if I add the DisableMetrics everything works fine (locally), because on the server I don't need to add anything and works fine.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 13, 2023, 7:14am UTC](https://discuss.elastic.co/t/apm-hangs-application-1724/321836/4 "2023-01-13T07:14:58Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
