elastic / elastic/apm-agent-nodejs
kibana OOM; captureSpanStackTraces:true implicated
- Dominant language
- JavaScript
- Stars
- 594
- Forks
- 244
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 16
Description
Repro details: https://github.com/elastic/kibana/issues/118560
This required (gleaned from some [private chat](https://elastic.slack.com/archives/C5G0S6QD7/p1637181574174300)) having APM enabled in Kibana with `captureSpanStackTraces: true`. That was accidentally set to true because the `serverUrl` was customized plus some [complexity in how `@kbn/apm-config-loader` works](https://github.com/elastic/kibana/issues/117492#issuecomment-969314277).
- Kibana: v7.15.1
- APM agent version: v3.21.1, but likely happens back to v3.16.0 (which is the min version specified in Kibana v7.15.1's deps).
Ideas:
- Straight-up leak; or
- A combination of: (a) capturing stack traces is so slow, and (b) capturing results in retaining references that indirectly keep the ES response bodies referenced while capturing, and (c) there were enough ES queries going on that it got backed up and eventually sucked all memory.
Contributor guide
Assessment
This issue has not been assessed yet.