GithubHelp home page GithubHelp logo

Comments (4)

fdesjardins avatar fdesjardins commented on June 13, 2024

Interesting. Are you seeing the same behavior for the examples? Can you try examples/simple.js and see what happens?

I only get the pool is draining error if I try to log something after I've called stream.end(), but the not exiting thing is suspicious too, so I'm wondering if the issue is with version incompatibilities or something.

from bunyan-postgres-stream.

rarkins avatar rarkins commented on June 13, 2024

The simple example runs and exist cleanly.

Although your example doesn't show a callback, it looks like end accepts one so I tried this:

  await sleep(5000);
  logger.info("Ending pg stream");
  pgStream.end(postEnd);
}

function postEnd() {
  console.log(process._getActiveHandles());
  console.log(process._getActiveRequests());
  process.exit();
}

Nothing is logged to console after Ending pg stream, so it seems the callback is not being called.

from bunyan-postgres-stream.

rarkins avatar rarkins commented on June 13, 2024

Hi again,

I just did a test run emulating my production data and - for some reason - the postgres log stream died after 28 seconds and 1184 rows. I don't know why this was, but I'll probably stop using this streaming and instead write to file and batch \copy to postgres. I don't want you to take any more time troubleshooting this problem in case it was specific to my environment anyway. Thanks.

from bunyan-postgres-stream.

fdesjardins avatar fdesjardins commented on June 13, 2024

Sounds good, thanks for the update. By the way, I just published a new version with some updated dependencies, including pg, so you might give that a go as well.

from bunyan-postgres-stream.

Related Issues (7)

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.