I work with Node.js, Express.js, Bookshelf.js and Knex.js
I get the following error with the default Knex pool definition.
Knex:Error Pool2 - Error: connect ECONNREFUSED
That is, with the following definition of knex (the default value for the .min pool is 2)
var knex = require('knex')({ client: 'mysql', connection: config.connection, });
I get an error
Knex:Error Pool2 - Error: connect ECONNREFUSED Knex:Error Pool2 - Error: connect ECONNREFUSED
Where it works great with the following definition.
var knex = require('knex')({ client: 'mysql', connection: config.connection, pool: { min: 0, max: 10 } });
I noticed that the error prints n times, where n is in the value of pool.min.
Can someone tell me why this is happening. Although the error is resolved, but since I am a beginner, I cannot understand why this is happening.
source share