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

I got this error, when trying to insert into a managed postgres db from digital ocean, i could view the db in the database manager and manual add rows. But when inserting in the live app, i got below error

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

What am i doing wrong?

This means that no connection can be established to your database.

It is accessible remotely so that Wappler can connect to it?

Usually you have to add your own ip to the trusted sites in the DO managed database to be able to connect remotely.

Wappler can connect to it. I can view tables in the databse manager.

I have already added my ip to trusted ip, the ca certificate was also uploaded.

When i try to insert, server action shows pending for more than 3 minutes, after i see error 500 ,and response is

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

here is fullError sreenshot

here are my setups

Setup2

I had a similar problem with Inserts from Wappler.
I could insert from DBeaver, but when doing Wappler insert step, it would timeout randomly.
Could not identify what the issue was, but restarting my Postgres server fixed it.

Don’t know if its the same in your case, but you can try restarting your DB server as well.

I have restarted the database cluster too… I am still receiving same error

Bump

Is it just the inset action that gives you error? All the queries go well?

Also on what target are you getting the error? Local development or remote live?

How is your database setup? Is it a specific table that the insert fails? Or all tables?

inserting and querying gives error ,i am on live server.
i am experiencing it on all tables. i can view the database on dbeaver and wappler database manager, and i can insert manually also

i have already sent my setup above(in my second reply). pls review it

Is your live server added to the trusted sources?

yes

Well it seems to me that your live server first gave access to your DO managed database server.

Maybe try DO tech support to see what else can be blocking the access.

Finally got it to work, i was connecting to the database with port 5432 in server connect,

Here is what i tried >>

I created a connection pool, and i added the connection pool details along with its ip(25061) and it worked.

I think it didn’t work before because i was using port 5432

1 Like