# \[7.4.1\] Problem histogram "unable to retrieve max and min values..."

**URL:** <https://discuss.elastic.co/t/7-4-1-problem-histogram-unable-to-retrieve-max-and-min-values/207659>\
**Category:** Kibana\
**Created:** [November 13, 2019, 8:54am UTC](https://discuss.elastic.co/t/7-4-1-problem-histogram-unable-to-retrieve-max-and-min-values/207659 "2019-11-13T08:54:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fabio-sama](https://avatars.discourse-cdn.com/v4/letter/f/b9e5f3/32.png) [@Fabio-sama](https://discuss.elastic.co/u/Fabio-sama)\
**Post date:** [November 13, 2019, 8:54am UTC](https://discuss.elastic.co/t/7-4-1-problem-histogram-unable-to-retrieve-max-and-min-values/207659/1 "2019-11-13T08:54:50Z")

</div>

Hi there,

I'm having some problems creating a histogram in Kibana 7.4.1.

It is very simple, splitting the X-axis over a `long` field `totalLatency`.

The "error" returned is `Unable to retrieve max and min values to auto-scale histogram buckets. This may lead to poor visualization performance`.

 ![error_histogram_kibana_7_4_1](https://us1.discourse-cdn.com/elastic/original/3X/4/4/44fbfaace79e4eee73c685e438a3a837bd91f132.png)

It never occurred in past versions of Kibana (e.g. 6.3.0).

I even tried flagging the `expand bounds` and setting the min a max values or changing the value in the `Minimum interval` field, but it keeps returning the same error.

It takes ages to load (even on small amount of data) and eventually shows the visualization (as you can see from the above posted image) and the error.

The real problem is in the dashboard, where it prevents the other visualizations from loading properly.

Any ideas? Might it be a possible bug of 7.4.1 histograms?

Thanks!

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [November 15, 2019, 9:55pm UTC](https://discuss.elastic.co/t/7-4-1-problem-histogram-unable-to-retrieve-max-and-min-values/207659/2 "2019-11-15T21:55:32Z")

</div>

How many indices/documents does your Kibana index-pattern cover? The histogram is doing a min and max aggregation, [https://github.com/elastic/kibana/blob/master/src/legacy/ui/public/agg\_types/buckets/histogram.ts#L102](https://github.com/elastic/kibana/blob/master/src/legacy/ui/public/agg_types/buckets/histogram.ts#L102), to retrieve the min and max values and it looks like that request may be timing out.

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [November 15, 2019, 9:59pm UTC](https://discuss.elastic.co/t/7-4-1-problem-histogram-unable-to-retrieve-max-and-min-values/207659/3 "2019-11-15T21:59:06Z")

</div>

Would you mind putting a break point at [https://github.com/elastic/kibana/blob/master/src/legacy/ui/public/agg\_types/buckets/histogram.ts#L123](https://github.com/elastic/kibana/blob/master/src/legacy/ui/public/agg_types/buckets/histogram.ts#L123) and returning the error from Elasticsearch? You may not event need a break point, just look at the network traffic in the brower's dev tools.

 ![35%20PM](https://us1.discourse-cdn.com/elastic/original/3X/e/7/e7f105a7bfe92eb0b7fed984c590baebf9910c6d.png)

---

<div class="post-metadata">

**Author:** ![Fabio-sama](https://avatars.discourse-cdn.com/v4/letter/f/b9e5f3/32.png) [@Fabio-sama](https://discuss.elastic.co/u/Fabio-sama)\
**Post date:** [November 15, 2019, 10:12pm UTC](https://discuss.elastic.co/t/7-4-1-problem-histogram-unable-to-retrieve-max-and-min-values/207659/4 "2019-11-15T22:12:17Z")

</div>

Hi!

First of all thank you so much for your reply. Unfortunately I cannot test it until monday since the visualization I'm referring to is being used in production and I have no access to those machines from home.

Though, I can tell you the test I made on version 7.4.1 was on a small part of the real data (stored on the 6.3.0), where the histogram visualization worked perfectly. How can it be so?

---

<div class="post-metadata">

**Author:** ![Fabio-sama](https://avatars.discourse-cdn.com/v4/letter/f/b9e5f3/32.png) [@Fabio-sama](https://discuss.elastic.co/u/Fabio-sama)\
**Post date:** [November 15, 2019, 10:17pm UTC](https://discuss.elastic.co/t/7-4-1-problem-histogram-unable-to-retrieve-max-and-min-values/207659/5 "2019-11-15T22:17:05Z")

</div>

Also, if that was the problem, would increasing the `elasticsearch.requestTimeout` in the `kibana.yml` sort out the problem?

---

<div class="post-metadata">

**Author:** ![Fabio-sama](https://avatars.discourse-cdn.com/v4/letter/f/b9e5f3/32.png) [@Fabio-sama](https://discuss.elastic.co/u/Fabio-sama)\
**Post date:** [November 18, 2019, 9:15am UTC](https://discuss.elastic.co/t/7-4-1-problem-histogram-unable-to-retrieve-max-and-min-values/207659/6 "2019-11-18T09:15:18Z")

</div>

Hi there!

Ok I set higher values in the `kibana.yml` for `kibana.autocompleteTimeout` and `kibana.autocompleteTerminateAfter` parameters and it finally loads the visualizations the right way. It was a timeout problem then, because of the amount of docs loaded despite the short time range.

Thank you so much for you help!

---

<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:** [December 16, 2019, 9:15am UTC](https://discuss.elastic.co/t/7-4-1-problem-histogram-unable-to-retrieve-max-and-min-values/207659/7 "2019-12-16T09:15:20Z")

</div>

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