question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v3.1.0 memory leak when metricsInterval is 0

See original GitHub issue

Describe 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: image

Local heapdumps: image

To Reproduce

  1. start agent with metricsInterval 0.
  2. wait
  3. 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:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
axwcommented, Nov 14, 2019

I’ve merged a fix - new release coming soon!

0reactions
axwcommented, Nov 19, 2019

The fix has been released in v3.2.0.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found