You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
I've implemented your module and was testing it to see how well it works. I found an issue with it when the database server dies the whole node application crashes because there is no event listener on error.
So this is what I did:
I have a node server that checks the database connection every 10 seconds.
I stopped the mysql server and start the node app. - I get this error: { [Error: connect ECONNREFUSED]
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect' }
I start the mysql server and the app reconnects to it.
I stop the mysql server and after a while, 2-5 seconds, I get this error: events.js:66
throw arguments[1]; // Unhandled 'error' event
^
Error: connect ECONNREFUSED
at errnoException (net.js:768:11)
at Object.afterConnect as oncomplete
Can you please fix this because I do not want my node app to die every time the database crashes?
The text was updated successfully, but these errors were encountered:
This needs some work on each Adapter, and not all of them are documented about error handling (PostgreSQL for example : https://github.com/brianc/node-postgres/wiki/Error-handling )
I will try to fix this, but since I don't have much free time these days I may need some help. Pull Requests would be appreciated... :-)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I've implemented your module and was testing it to see how well it works. I found an issue with it when the database server dies the whole node application crashes because there is no event listener on error.
So this is what I did:
I have a node server that checks the database connection every 10 seconds.
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect' }
throw arguments[1]; // Unhandled 'error' event
^
Error: connect ECONNREFUSED
at errnoException (net.js:768:11)
at Object.afterConnect as oncomplete
Can you please fix this because I do not want my node app to die every time the database crashes?
The text was updated successfully, but these errors were encountered: