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.

Node: 5.6.0 elasticsearch.js: 12.1.3 elasticsearch: 5.0

var client = new elasticsearch.Client({
  host: 'localhost:9200',
  apiVersion: '5.0',
  sniffOnStart: false,
  connectionClass: 'http'
});

When we are using bulk API, we are facing serious memory leak, the app memory reached up to 5.0G.

client.bulk([params, [callback]]) // Just a bulk of 10 records per second.

The app has only this code, so it’s definitely the source. am I the only one who has experienced it?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
spalgercommented, Feb 14, 2017

Alright, I just revisited those metrics I was quoting earlier and it looks like the average is pretty misleading. The processes at the top of the chart above were actually running out of memory and dying, so definitely seems like a memory leak. Thankfully, master (which is now 13.0.0-beta1) is not in that group.

0reactions
tienvxcommented, Mar 1, 2017

I tested on 13.0.0-beta2, and it works. No more memory leak while I’m using it with rabbitmq to index ~200.000 records from mysql to elasticsearch.

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 >
Definition of memory leak - PCMag
When memory is allocated, but not deallocated, a memory leak occurs (the memory has leaked out of the computer). If too many memory...
Read more >
Memory Leaks and Garbage Collection | Computerworld
DEFINITION A memory leak is the gradual deterioration of system performance that occurs over time as the result of the fragmentation of a...
Read more >
Find a memory leak - Windows drivers - Microsoft Learn
A memory leak occurs when a process allocates memory from the paged or nonpaged pools, but doesn't free the memory.
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