elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.72k stars 8.14k forks source link

[Watcher] History queries can consume a lot of memory #157251

Open jloleysens opened 1 year ago

jloleysens commented 1 year ago

Kibana version:

I think current (ea23bbb24cd)

Describe the bug:

If a watch histories items start growing very large, this can lead to a lot of data being loaded into Kibana for the watch history UI.

Steps to reproduce: Not easy to create an environment that reproduces this, but essentially running a search as we do in x-pack/plugins/watcher/server/routes/api/watch/register_history_route.ts can lead to a lot of data unintentionally being loaded.

Expected behavior: The query to get watch history should only load the absolute minimum data using something like _source_excludes or _source_includes.

Any additional context: Has led to Kibana crashes due to OOM exceptions

elasticmachine commented 1 year ago

Pinging @elastic/platform-deployment-management (Team:Deployment Management)

alisonelizabeth commented 1 year ago

This looks similar to a very old watcher issue - https://github.com/elastic/kibana/issues/20745

elasticmachine commented 2 days ago

Pinging @elastic/kibana-management (Team:Kibana Management)