New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unhandled 'error' event #174
Comments
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. |
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. also is this the right way to handle the error
|
That |
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 |
I am using this library to stream data from the database however after running for a while it gives me the following error
throw er; // Unhandled 'error' event ^ Error: Connection terminated unexpectedly at Connection.<anonymous> (/var/app/current/node_modules/pg/lib/client.js:132:73) at Object.onceWrapper (events.js:482:28) at Connection.emit (events.js:376:20) at Connection.emit (domain.js:470:12) TLSSocket.<anonymous> (/var/app/current/node_modules/pg/lib/connection.js:108:12)
till now I suppose it was the issue of pg npm but I am not using that in my project. how to handle the error or any solution to take care of this error would be helpful. Please reply as soon as you can
version - ^4.0.0
The text was updated successfully, but these errors were encountered: