# Stats endpoints response slow

**URL:** <https://discuss.elastic.co/t/stats-endpoints-response-slow/310062>\
**Category:** Elasticsearch\
**Created:** [July 19, 2022, 7:27pm UTC](https://discuss.elastic.co/t/stats-endpoints-response-slow/310062 "2022-07-19T19:27:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![scroodj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scroodj/32/55132_2.png) [@scroodj](https://discuss.elastic.co/u/scroodj)\
**Post date:** [July 19, 2022, 7:27pm UTC](https://discuss.elastic.co/t/stats-endpoints-response-slow/310062/1 "2022-07-19T19:27:54Z")

</div>

Elasticsearch: 7.5.1  
Infrastructure: Azure AKS  
Storage: Standard SSD

\_cat/nodes

```auto
name m role ip ramMax ramPercent ramCurrent heapMax heapPercent heapCurrent diskTotal diskUsed cpu uptime iic
elasticsearch-master-1 * dilm 10.240.9.33 62.8gb 66 41.2gb 14.9gb 50 7.5gb 2tb 1.5tb 5 1.2d 0
elasticsearch-master-0 - dilm 10.240.1.28 62.8gb 60 37.7gb 14.9gb 68 10.2gb 2tb 1.3tb 5 1.2d 0
elasticsearch-master-2 - dilm 10.240.9.12 62.8gb 67 42gb 14.9gb 46 6.9gb 2tb 1.5tb 4 1.1d 0

```

\_cat/allocation

```auto
shards disk.indices disk.used disk.avail disk.total disk.percent host ip node
   999 1.5tb 1.5tb 449.1gb 2tb 78 10.240.9.33 10.240.9.33 elasticsearch-master-1
   999 1.5tb 1.5tb 499.9gb 2tb 75 10.240.9.12 10.240.9.12 elasticsearch-master-2
   999 1.3tb 1.3tb 717.3gb 2tb 65 10.240.1.28 10.240.1.28 elasticsearch-master-0

```

Hello Team,  
After recent ELK cluster reboot Node and Indice stats endpoints eventually become very slow for one ( **elasticsearch-master-2** ) of 3 nodes in the cluster.  
I narrowed down the slowness to a specific metric of the **translog** , examples below:

**GET /\_nodes/elasticsearch-master-2/stats/indices/translog**

**GET /\_all/\_stats/translog**

It takes about 10-15s for one single task to process acording to \_cat/tasks.  
All other metrics return result almost immidiatly for the affected node.

We use elasticsearch\_exporter to send metrics to Prometheus by having it enabled it becomes impossible to use cluster: [\_cat/tasks](https://gist.github.com/scroodj/ec8b9f513b8e7cd395e2695c87c48a1e)

As a workaround we shutdown the exporter. Is there a well known bug for this behavior or any chance to find the root cause of the unexpected slowness?

Thank you.

BR  
Aleksandr

---

<div class="post-metadata">

**Author:** ![scroodj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scroodj/32/55132_2.png) [@scroodj](https://discuss.elastic.co/u/scroodj)\
**Post date:** [July 19, 2022, 7:44pm UTC](https://discuss.elastic.co/t/stats-endpoints-response-slow/310062/2 "2022-07-19T19:44:08Z")

</div>

Hot threads report during long running task [/\_nodes/\_local/hot\_threads](https://gist.github.com/scroodj/5c0d0210388604c176e00065926f4153)

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [July 19, 2022, 8:08pm UTC](https://discuss.elastic.co/t/stats-endpoints-response-slow/310062/3 "2022-07-19T20:08:22Z")

</div>

Looks like the caching introduced in [#82721](https://github.com/elastic/elasticsearch/pull/82721) should fix this for you. You should upgrade anyway, v7.5 is very old and long past [EOL](https://www.elastic.co/support/eol) so it's not supported any more.

---

<div class="post-metadata">

**Author:** ![scroodj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scroodj/32/55132_2.png) [@scroodj](https://discuss.elastic.co/u/scroodj)\
**Post date:** [July 20, 2022, 8:27am UTC](https://discuss.elastic.co/t/stats-endpoints-response-slow/310062/4 "2022-07-20T08:27:12Z")

</div>

Thank you David for the reply!

---

<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:** [August 17, 2022, 8:28am UTC](https://discuss.elastic.co/t/stats-endpoints-response-slow/310062/5 "2022-08-17T08:28:06Z")

</div>

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