# Request handler being called every few seconds Kibana 7.10.2

**URL:** <https://discuss.elastic.co/t/request-handler-being-called-every-few-seconds-kibana-7-10-2/273873>\
**Category:** Kibana\
**Created:** [May 24, 2021, 10:02pm UTC](https://discuss.elastic.co/t/request-handler-being-called-every-few-seconds-kibana-7-10-2/273873 "2021-05-24T22:02:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssimmons](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@ssimmons](https://discuss.elastic.co/u/ssimmons)\
**Post date:** [May 24, 2021, 10:02pm UTC](https://discuss.elastic.co/t/request-handler-being-called-every-few-seconds-kibana-7-10-2/273873/1 "2021-05-24T22:02:13Z")

</div>

I've been able to convert a few custom plugins from Kibana 7.5 to Kibana 7.10.2. However, I've noticed that my request handlers are being called every 6-7 seconds even when I'm not interacting with the page. Is this behavior normal for Kibana 7.10.2? I've not seen this behavior with other versions of Kibana.

From what I can tell, it looks like the AsyncScheduler.prototype.flush function is getting called every 6-7 seconds. Does anyone know what would be calling this function?

---

<div class="post-metadata">

**Author:** ![dosant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dosant/32/64489_2.png) [@dosant](https://discuss.elastic.co/u/dosant)\
**Post date:** [May 25, 2021, 9:38am UTC](https://discuss.elastic.co/t/request-handler-being-called-every-few-seconds-kibana-7-10-2/273873/2 "2021-05-25T09:38:01Z")

</div>

Hi @ssimmons, a full stack trace would be helpful.  
Also could you double check that auto refresh is turned off?

---

<div class="post-metadata">

**Author:** ![ssimmons](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@ssimmons](https://discuss.elastic.co/u/ssimmons)\
**Post date:** [May 25, 2021, 1:51pm UTC](https://discuss.elastic.co/t/request-handler-being-called-every-few-seconds-kibana-7-10-2/273873/3 "2021-05-25T13:51:43Z")

</div>

Stepping through the code, it does appear that a refresh interval is being set. How do I check that auto refresh is turned off in a custom plugin? The "setRefreshInterval" function from within the timefilter.ts file is being called as Kibana is loading my plugins. The refreshInterval object is defined as `refreshInterval: { pause: false, value: 10000 }` so it appears a refresh interval is being set. If I just load the Kibana homepage, it stops in the same "setRefreshInterval" function but the refreshInterval object is defined as `refreshInterval: { pause: true, value: 0 }` so it never sets the interval.

After loading the home page and dashboard main page a few times, now the refreshInterval is set back to normal for my plugins as `refreshInterval: { pause: true, value: 0 }`. I'm not sure what cause it to get set to every 10 seconds. Is there a function call I can make within my custom plugins to set the refreshInterval to `refreshInterval: { pause: true, value: 0 }` so this doesn't happen again?

---

<div class="post-metadata">

**Author:** ![dosant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dosant/32/64489_2.png) [@dosant](https://discuss.elastic.co/u/dosant)\
**Post date:** [May 25, 2021, 2:25pm UTC](https://discuss.elastic.co/t/request-handler-being-called-every-few-seconds-kibana-7-10-2/273873/4 "2021-05-25T14:25:35Z")

</div>

@ssimmons, when you save a dashboard you can check an option to "save time" with it. In this case `refreshInterval` is also saved with a dashboard and then it is being set when dashboard is opened. Could it be your case? Maybe you are opening a dashboard with auto refresh turned on?

you can use `timeFilter` service from data plugin in your plugin: `data.query.timefilter.timefilter.setRefreshInterval`

> <https://github.com/elastic/kibana/blob/73b6048ba1076f53b826214ac9736bf7e2f8d5b4/src/plugins/data/public/query/timefilter/timefilter.ts#L151>

---

<div class="post-metadata">

**Author:** ![ssimmons](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@ssimmons](https://discuss.elastic.co/u/ssimmons)\
**Post date:** [May 25, 2021, 3:25pm UTC](https://discuss.elastic.co/t/request-handler-being-called-every-few-seconds-kibana-7-10-2/273873/5 "2021-05-25T15:25:33Z")

</div>

Thanks for the reply. I'm not aware of selecting the save time option when saving any of my dashboards. I've created 9 Kibana dashboards within 7.10.2 and it was doing it with all my dashboards. I first noticed this behavior after I did a "yarn kbn bootstrap" command.

---

<div class="post-metadata">

**Author:** ![dosant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dosant/32/64489_2.png) [@dosant](https://discuss.elastic.co/u/dosant)\
**Post date:** [May 26, 2021, 1:57pm UTC](https://discuss.elastic.co/t/request-handler-being-called-every-few-seconds-kibana-7-10-2/273873/6 "2021-05-26T13:57:58Z")

</div>

@ssimmons, I am just guessing, that one possible reason, why `refreshInterval` gets enabled for you, is because you open a dashboard that enables auto refresh when it opens.

This could happen if refreshInterval setting with auto-refresh enabled was saved with the dashboard. This behavior is controlled by this checkbox:

 ![Screen Shot 2021-05-26 at 15.55.51](https://us1.discourse-cdn.com/elastic/original/3X/2/6/26f51828d80d46066e73e03312bdaf24921d5db3.png)

---

<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:** [June 23, 2021, 1:58pm UTC](https://discuss.elastic.co/t/request-handler-being-called-every-few-seconds-kibana-7-10-2/273873/7 "2021-06-23T13:58:00Z")

</div>

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