Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Conversation

@VaoTsun
Copy link

@VaoTsun VaoTsun commented Jan 14, 2015

this would bix a bug - when app hits max connections limit in pg db the whole app crashes with:

events.js:72
throw er; // Unhandled 'error' event
^
error: terminating connection due to administrator command

code is borrowed from sequelize/sequelize#1854

this would bix a bug - when app hits max connections limit in pg db the whole app crashes with:

events.js:72
        throw er; // Unhandled 'error' event
              ^
error: terminating connection due to administrator command

code is borrowed from sequelize/sequelize#1854
@VaoTsun
Copy link
Author

VaoTsun commented Jan 14, 2015

Hi,
DBWrapper.close( function(err) {console.log('Connection closed !');} ); not working for me. which I did not investigate, so quite soon I hit max sessions in postgres. So I see mentioned throw er; // Unhandled 'error' event and my app crashes. This would happen when you restart db as well. and so on... this problem is common for pg clients. so I copied decision to your code - it is 3 lines

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant