# Elastic-apm-node memory leak

**URL:** <https://discuss.elastic.co/t/elastic-apm-node-memory-leak/179245>\
**Category:** APM\
**Tags:** nodejs\
**Created:** [May 1, 2019, 7:52pm UTC](https://discuss.elastic.co/t/elastic-apm-node-memory-leak/179245 "2019-05-01T19:52:38Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![sammaxwell](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@sammaxwell](https://discuss.elastic.co/u/sammaxwell)\
**Post date:** [May 6, 2019, 12:32pm UTC](https://discuss.elastic.co/t/elastic-apm-node-memory-leak/179245/8 "2019-05-06T12:32:54Z")

</div>

It seems like 2.11.0 fixes the MaxListeners warning and the FATAL out of memory!

I still see that the SPANS are not being automatically created except for the first iteration.

- set ELASTIC\_APM\_LOG\_LEVEL to "Trace"
- run the test for 10 iterations
- look at the trace output
- notice how the "start span"/"ended span"/"encoding span" appears on the first iteration, but not the 2nd through 10th iterations
- if you look at the apm docs with kibana you will notice that the spans do not appear

---

_[View the full topic](https://discuss.elastic.co/t/elastic-apm-node-memory-leak/179245)._
