Skip to content
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

disconnect call not closing connection for Amazon RDS db #92

Open
mehult opened this issue Feb 2, 2013 · 0 comments
Open

disconnect call not closing connection for Amazon RDS db #92

mehult opened this issue Feb 2, 2013 · 0 comments

Comments

@mehult
Copy link

mehult commented Feb 2, 2013

I am using db-mysql in conjunction with the generic-pool class (https://github.com/coopernurse/node-pool). However it does not appear that the disconnect call is actually closing the connection, as the RDS manager shows the number of open connections monotonically increasing, even when the disconnect calls are made. I'm using the follow code block for the pool:

pool = generic_pool.Pool({
name: 'mysql',
max: 10,
create: function(callback) {
new mysql.Database(helper.dbOpt).connect(function(err, server) {
if (err) console.log('ERROR CONNECTING TO DB FOR CXN POOL: ' + err);
//else console.log('Connected to db.');

  callback(err, this);
});

},
destroy: function(db) {
db.disconnect();
}
});

I can log the destory method is being called, but disconnect() has no effect on the open connections

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant