Comments (4)
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.
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.
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.
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
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 bunyan-postgres-stream.