exception for "terminating connection due to administrator command"
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 https://github.com/sequelize/sequelize/issues/1854
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