Coder Social home page Coder Social logo

Comments (6)

ronkorving avatar ronkorving commented on June 17, 2024

Yeah, that's a crazy high number, but you're not incorrect :)
Basically it boils down to being able to send 1 million logs per second per process for 285 years. I hope that anyone logging that much with this library, is willing to put in a PR to fix this ;)

from node-graylog2.

jasonmcaffee avatar jasonmcaffee commented on June 17, 2024

I'm looking into a significant memory leak in your module when running inside of a docker 1.11 container, and there is no graylog server running to accept messages.

I've been able to rule out dgram, going to take a look at zlib next...

from node-graylog2.

jasonmcaffee avatar jasonmcaffee commented on June 17, 2024

The memory leak issue is with zlib.deflate.

Just doing this inside of docker (latest node) eats up 1GB of ram on my macbook pro, and it never releases

let zlib = require('zlib');

let message = {
  some:"data"
};
let payload = new Buffer(JSON.stringify(message));

for(var i =0; i < 10000; ++i){
  zlib.deflate(payload, function (err, buffer) {
  });
}

It's also a memory leak without docker, just nowhere near as bad. After that runs, local node process has ~250MB of ram.

nodejs/node#8871

from node-graylog2.

ronkorving avatar ronkorving commented on June 17, 2024

As @bnoordhuis explained, this is not that strange. You're deflating 10000 times in parallel. Anyway, unrelated to node-graylog2.

from node-graylog2.

jasonmcaffee avatar jasonmcaffee commented on June 17, 2024

@ronkorving I'm not sure what you mean. Using your package causes our services to crash after about a week of logging (our services aren't heavily utilized at the moment, so its not even a large amount of logging). Your package uses uses zlib deflate. Anyone who uses your package on a Linux system will be affected by this issue.

from node-graylog2.

ronkorving avatar ronkorving commented on June 17, 2024

Let's discuss that in issue #19, where it belongs (and where you can see that I'm all for allowing compression to be configurable). I'm gonna close this one.

from node-graylog2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.