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
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
The text was updated successfully, but these errors were encountered:
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.');
},
destroy: function(db) {
db.disconnect();
}
});
I can log the destory method is being called, but disconnect() has no effect on the open connections
The text was updated successfully, but these errors were encountered: