This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Description
I am running the phantom pool to maintain the instances of the phantomJS with
const pool = phantomPool.default({ max: 100, // default min: 20, // default // how long a resource can stay idle in pool before being removed idleTimeoutMillis: 30000, // default. // maximum number of times an individual resource can be reused before being destroyed; set to 0 to disable maxUses: 50, // default // function to validate an instance prior to use; see https://github.com/coopernurse/node-pool#createpool validator: () => Promise.resolve(true), // defaults to always resolving true // validate resource before borrowing; required for maxUses and validator
testOnBorrow: true, // default
// For all opts, see opts at https://github.com/coopernurse/node-pool#createpool
phantomArgs: [['--ignore-ssl-errors=true', '--disk-cache=true'], {
logLevel: 'info',
}], // arguments passed to phantomjs-node directly, default is []. For all opts, see https://github.com/amir20/phantomjs-node#phantom-object-api
})`
I run the application after sometime the number of phantom instances is going beyond 100(which is the maximum)