Comments (4)
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.
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.
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.
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)
- [Inquiry]: Supported SQLite connection protocols HOT 1
- documentation on insert ID HOT 2
- Dynamically choosing a schema in Postgres queries HOT 1
- [pg-migrations] CockroachDB SQL version parsing HOT 1
- Postgres: pg-typed: support for arrays
- pg - optional id for `generated always as identity`
- pg: Cannot interpolate values into Postgres 14-style JSON queries
- Mysql: where in expression?
- Unable to compile typescript targeting ESNext with ES Module HOT 1
- Pg queryNodeStream ignoring batchSize and highWaterMark HOT 2
- [Postgres] Support bigIntMode for pg-schema-cli, pg-schema-print-types
- sqlite and multiple processes HOT 1
- split-sql-query breaks a trigger into multiple queries HOT 4
- Event Handlers: does not support promises HOT 2
- Request for Generic Type Support in 'Queryable.query' HOT 1
- Add support for `stream` parameter for PostgreSQL and MySQL HOT 1
- Dates and Timestamps retrieved from Postgres are offset incorrectly based on the local time zone
- Support for PostgreSQL partitioned tables
- removed cuid dependency as it's deprecated HOT 2
- Question: Capability of browser and esm HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atdatabases.