Request handler being called every few seconds Kibana 7.10.2

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?

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

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?

@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

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.

@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:

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