Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting (trx) call?

#1

I’m having problems with my first application in adonisjs.
The error is:
`Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting (trx) call?

I have a user registry where I use transaction … should I remove this ‘commit rollback’?

0 Likes

#2

It is necessary Database.close() ?
That may be my problem ?

If I make a user registration through the Model User I will not need to close the connection?

0 Likes

#3

DB connections must always be closed. But under the hood, Database.close() is run automatically at the end of the execution of your model’s method - I think. I am not sure, but at least Laravel functions this way.

1 Like

#4

And when I use Database.beginTransaction()
I’m forced to terminate the connection ?

0 Likes

#5

If you commit the transaction, then the database connection should close automatically.

0 Likes

#6

You maybe making a call to the DB without the transaction somewhere in your code.

0 Likes