v3.1.0 memory leak when metricsInterval is 0
See original GitHub issueDescribe the bug
Memory leak detected when metricsInterval
is set 0. You just start application and wait and then take a heap dump.
Repository: https://github.com/evgeni-k/apm-node-metrics-mem-leak
Config:
const APM = require(`elastic-apm-node`);
APM.start({
metricsInterval: 0,
metricsLimit: 100,
serviceName: `mem-leak`,
serverUrl: `http://localhost:8200`,
});
Production memory consumption graph:
Local heapdumps:
To Reproduce
- start agent with
metricsInterval
0. - wait
- take a heap dump and analyze
Metrics
usage
Expected behavior
If set up to not send metrics then it will be great to not collect them at all.
Environment (please complete the following information)
- OS: Win10 x64
- Node.js 10.15.0
- APM Server: 7.4
- Agent vresion: 3.1.0
How are you starting the agent? (please tick one of the boxes)
- Calling
agent.start()
directly (e.g.require('elastic-apm-node').start(...)
) - Requiring
elastic-apm-node/start
from within the source code - Starting node with
-r elastic-apm-node/start
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Memory leak in v3.28.0 · Issue #2569 · elastic/apm-agent-nodejs
Describe the bug High memory usage in v3.28.0, up to a point where the Node processes become unresponsive. Restarting reproduces.
Read more >1708999 – High memory consumption by networking-ovn ...
3. After 4 days try to create a VM and access it. ... Memory consumption of metadata agent process is too high (4GB)...
Read more >Configuring the memory leak policy - IBM
When a classloader memory leak is detected, WebSphere® Application Server notifies you with informational messages in the log and by taking JVM heapdumps...
Read more >Node.js Agent version 3.x - Elastic
Known issue: This release includes a memory leak in instrumentation of the ... Remove support for instrumenting versions of fastify earlier than 1.0.0....
Read more >Re: Anyone seeing OneAgent 1.233 causing memory leak on ...
Since OA was upgraded to 1.233 at one of my customers we are seeing erratic memory consumption on many hosts that run Debian...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve merged a fix - new release coming soon!
The fix has been released in v3.2.0.