-
Notifications
You must be signed in to change notification settings - Fork 468
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
Infinite pool error event #464
Comments
I have something similar, in my case ESOCK error when the network goes down. pool.on('error', error => {
this.err = error
throw new Error('Socket error, thown expcetion to prevent error loop')
}) |
Can you explain where you catch that exception? |
This is due to a problem with thee way |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is the code
When the pool is initialized connection is available. Once connection is established I intentionally shutdown Sql Server and try to execute registerUser.
Here is what I get in my log:
...
2017-05-04 15:13:15 EDT - crit: Pool error. ConnectionError: Failed to connect to 192.168.1.116:1433 - connect ECONNREFUSED 192.168.1.116:1433
2017-05-04 15:13:16 EDT - crit: Pool error. ConnectionError: Failed to connect to 192.168.1.116:1433 - connect ECONNREFUSED 192.168.1.116:1433
2017-05-04 15:13:16 EDT - crit: Pool error. ConnectionError: Failed to connect to 192.168.1.116:1433 - connect ECONNREFUSED 192.168.1.116:1433
2017-05-04 15:13:17 EDT - crit: Pool error. ConnectionError: Failed to connect to 192.168.1.116:1433 - connect ECONNREFUSED 192.168.1.116:1433
2017-05-04 15:13:17 EDT - crit: Pool error. ConnectionError: Failed to connect to 192.168.1.116:1433 - connect ECONNREFUSED 192.168.1.116:1433
...
Messages never stop. It just keeps loging errors indefinitly.
If I don't sign up for pool error event I get
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): ConnectionError: Failed to connect to 192.168.1.116:1433 - connect ECONNREFUSED 192.168.1.116:1433
The text was updated successfully, but these errors were encountered: