coopernurse / node-pool

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

Resources being evicted even after reaching minimum pool size #230

Closed indfnzo closed 6 years ago

indfnzo commented 6 years ago

Hi all!

With the evictionRunIntervalMillis option set to some sane amount, the factory keeps destroying clients even after reaching the minimum pool size. Essentially, every minute, it destroys and recreates a resource after reaching the minimum size.

Something awry is going on here, since clearly the default evictor is checking this already: https://github.com/coopernurse/node-pool/blob/72b31a434c7b05ad879b2ace9830a9aa9fbba002/lib/DefaultEvictor.js#L9

Any ideas?

Related: #200

indfnzo commented 6 years ago

Silly, my problem was with idleTimeoutMillis and softIdleTimeoutMillis.

Please ignore this issue. Thanks :)