coopernurse / node-pool

Generic resource pooling for node.js
2.37k stars 259 forks source link

pool is draining and cannot accept work #238

Open catamphetamine opened 6 years ago

catamphetamine commented 6 years ago

Hello. I came here from this Sequelize issue: https://github.com/sequelize/sequelize/issues/8468 Sequelize uses generic-pool internally. I was looking for a way to close all connections in the pool while also not closing the pool itself because it's gonna be reused in future.

The "drain and clean" approach seemed to work at first but then it prohibited reusing the pool after it has been drained: pool is draining and cannot accept work https://github.com/sequelize/sequelize/issues/8468#issuecomment-410451242

Is there a way to "drain and clean" the pool while also preserving it in a working state for later use?

t3hmrman commented 5 years ago

@catamphetamine / @sandfox I think this issue can be closed, sequelize-pool was created (and is now being used by the sequelize project) for this, this issue should be re-filed there (I think it's not an issue anymore but I might be wrong)