I'm getting this error everytime i run yarn knex seed:run:
Error while executing "/home/user/path-to-the-file/my-seed.js" seed: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
The problem is that i send the project for other people and they can run it normally, i already tried all answers about it of the internet, i don't know what to do anymore.
My database config:
const config = Object.freeze({
client: 'pg',
pool: {
min: 0,
max: 5,
idleTimeoutMillis: 30000,
createTimeoutMillis: 3000,
acquireTimeoutMillis: 30000,
reapIntervalMillis: 1000,
createRetryIntervalMillis: 100,
propagateCreateError: false
},
connection: Object.freeze({
...database
})
})
- Knex version: "^0.95.8"
- pg version: "^8.7.1"
- Yarn version: 1.22.11
- Node version: 14.17.4
I already tried to downgrade pg and node, it didnt work, nothing works.
There is a issue on Knex repository saying that upgrading to latest pg solves it, but it didnt work too: https://github.com/knex/knex/issues/2820
Can someone help me?