elastic / kibana

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

[Proposal] Memory Leak detection system #119023

Open timroes opened 2 years ago

timroes commented 2 years ago

We have seen a histry of memory leaks in Kibana (#99473, #99471, elastic/elastic-charts#1148, #20342, #59454), which are often impacting users running Kibana fo ra long time, especially with auto refresh on. This might cause the browser tab to crash then after a couple of days running. While we can't reliably automate memory leak detection during development, I'd suggest we build a system that tries to at least detect if a recent snapshot introduced a memory leak.

That system could do the following:

This would of course not allow us to pinpoint a memory leak directly to a PR, which would be nice. But it would help us at least recognize after 2 days if some change caused us a new memory leak in Kibana, and someone can start investigating the snapshot manually finding the (newly introduced) problematic code.

cc @pauldotpower

elasticmachine commented 2 years ago

Pinging @elastic/kibana-qa (Team:QA)

elasticmachine commented 2 years ago

Pinging @elastic/kibana-operations (Team:Operations)

LeeDr commented 2 years ago

@marius-dr did this a few times on an ad-hoc basis. I think we just had Stack Monitoring on the Kibana server and metricbeat data collection on the browser process CPU and memory. Maybe a bit more. @marius-dr could you describe what you did here? Was the monitoring data and metricbeat data sent to a different cluster? I think we need that so we can compare over time.

Dosant commented 2 years ago

Was debugging my branch thinking that my changes caused a memory leak, turned out it exists in main. Filed coupe more issues: