Giter Site home page Giter Site logo

Comments (4)

ForbesLindesay avatar ForbesLindesay commented on May 7, 2024

The streaming APIs are very difficult to test. If you can produce a test case showing a problem where I just need a Postgres docker container and a JavaScript file to run, I am happy to look into fixing issues.

from atdatabases.

bharatiprashant avatar bharatiprashant commented on May 7, 2024

Hi @ForbesLindesay, the problem exists from the DB side my DB cannot take a load and it terminates the connection. it there any way to retry the connection.
For the test case, I need to have millions of data on my table and do a CPU intensive task

also is this the right way to handle the error

const db = createConnectionPool({
  bigIntMode: "bigint",
  user: app.db_user,
  host: app.db_host_reader,
  database: app.db_name,
  password: app.db_password,
  port: app.db_port,
  keepAlive: true,
  poolSize: 5,
  idleTimeoutMilliseconds: 0,
  connectionTimeoutMilliseconds: 0,
  onError(err) {
    console.log(err);
  },
});

from atdatabases.

ForbesLindesay avatar ForbesLindesay commented on May 7, 2024

That onError is only for errors in connections that are in the pool. To handle errors during the stream, you would need to attach an error handler to the node.js stream using .on('error', err => console.log(err))

from atdatabases.

ForbesLindesay avatar ForbesLindesay commented on May 7, 2024

The latest release does fix some errors related to unhandled errors in Postgres connections, so I suspect this may be resolved. If you can still reproduce it, please open a fresh issue with a failing test (it's ok if it's a test that only fails 1% of the time as we can just put it in a for (let i = 0; i < 1000; i++) loop)

from atdatabases.

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.