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.

memory leak problem

See original GitHub issue

We have add the apm agent with express , our codes is:

require('elastic-apm-node').start({
    serviceName: 'activity-service',
    serverUrl: 'http://es-apm-svc.infra.svc.cluster.local:8200',
    transactionSampleRate: 0.2,
    transactionMaxSpans: 32,
    flushInterval: 5,
    serverTimeout: 10,
    maxQueueSize: 50,
})

global.Promise = require('bluebird')

const PORT = process.env.PORT || 7000
const app = require('./app')

app.listen(PORT, function () {
    console.info('Node app is running, port:', PORT)
})

But we find the memory usage is increasing until hit the memory limit .

image

We also put the same code in Koa applications , but the problem is still existed .

We find the issues elastic/apm-agent-nodejs#243 But @Qard said that it has been fixed ?

We also try to change our config like :

require('elastic-apm-node').start({
    serviceName: 'activity-service',
    serverUrl: 'http://es-apm-svc.infra.svc.cluster.local:8200',
    transactionSampleRate: 0.2,
    transactionMaxSpans: 32,
    flushInterval: 5,
    serverTimeout: 10,
    maxQueueSize: 50,
    sourceLinesErrorAppFrames: 0,
    sourceLinesErrorLibraryFrames: 0,
})

But it’s not work .

Our dependencies is :

    "mongoose": "4.9.9",
    "express": "4.12.4",
    "bluebird": "3.1.1",

and the applications run in kubernets .

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:39 (16 by maintainers)

github_iconTop GitHub Comments

2reactions
Thetortugacommented, Nov 21, 2018

Hi. It appears to be ok for us too ! Thanks !

1reaction
junereycasugacommented, Nov 15, 2018

yea. it seems to be fixed. we have only tested it in our performance testing environment. hopefully we’ll get it to our production environment soon. thanks @watson @Qard

Read more comments on GitHub >

github_iconTop Results From Across the Web

Memory leak - Wikipedia
In computer science, a memory leak is a type of resource leak that occurs when a computer program incorrectly manages memory allocations in...
Read more >
What is Memory Leak? How can we avoid? - GeeksforGeeks
Memory leak occurs when programmers create a memory in heap and forget to delete it. The consequences of memory leak is that it...
Read more >
What Is a Memory Leak and How Do They Happen?
A memory leak is one of the major causes of the slowing down of a computer. It can be dangerous and lead to...
Read more >
How do I check for memory leaks, and what should I do to stop ...
The system can have a myriad of symptoms that point to a leak, though: decreased performance, a slowdown plus the inability to open...
Read more >
Memory leak - OWASP Foundation
Most memory leaks result in general software reliability problems, but if an attacker can intentionally trigger a memory leak, the attacker might be...
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