-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'eCommerce Promotion Tracking' TSVB vis causes Possible EventTarget memory leak detected. #132571
Comments
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
I think it's related to abort listeners and the fact that TSVB is doing a bunch of searches in parallel. See also #125197 (comment) @pgayvallet @delvedor Is there something we should/could do different here? I don't think it's an actual issue but if even a single user can trigger this limit then it's likely it will occur a lot on a busy Kibana server (and 10 seems like a low limit for a global pool of abort listeners). Should we bump it to 100 or so? |
I'm not sure. I would have expected elastic/elastic-transport-js#42 to fix the problem upstream tbh. @delvedor do you think we could be doing anything wrong here, or as @flash1293 said, it's just normal to reach the default limit under heavy load and we should just increase it? |
if there is one listener per request then dozens of them at the same time are definitely expected. Relabelling to core team as it seems like this isn't related to the TSVB integration - if that turns out to be wrong please relabel. |
Pinging @elastic/kibana-core (Team:Core) |
Hello! If you are reusing the abort signal multiple times, the client is cleaning up listeners as soon as they are no longer needed, but if you are sending more than 10 concurrent requests with the same abort signal, then you will hit that "issue" again. If it's expected to share the same abort signal among multiple concurrent request, you can change the max listeners limit with:
|
Thanks, that helps. So I tested around a bit and it seems like the search service attaches 3 listeners per search. As a single TSVB request can do multiple searches, it's going quickly above that limit. Adding
to the TSVB code silences the warning, but it's a little annoying it needs to know about implementation details of the search service to do so (why 3?). I'm a little on the fence on how to fix this. To get rid of the warning I'm going to add the above line to the service for now but maybe we can improve. |
Kibana version: 8.3.0 (main source)
Elasticsearch version: 8.3.0
Server OS version: OSX
Browser version: Edge (Chromium)
Browser OS version:
Original install method (e.g. download page, yum, from source, etc.):
node scripts/functional_tests_server.js --config x-pack/test/functional/config.base.js
Describe the bug: A TSVB visualizations included with the eCommerce sample data set logs a warning and stack trace about "Possible EventTarget memory leak detected."
Steps to reproduce:
[eCommerce] Promotion Tracking
visualization.Expected behavior: Opening the visualization shouldn't cause warnings with stack traces.
Screenshots (if relevant):
Errors in browser console (if relevant):
Provide logs and/or server output (if relevant):
Any additional context:
It seems that if I remove just one of the series from the visualization the warning stops.
The text was updated successfully, but these errors were encountered: