Custom queries stay with “pending” status

OS info

  • Operating System : Mac OSX 19.5.0
  • Wappler Version : 3.8.3

Problem description

The deploy is succesful. When load the page, everything works fine. But when reload the page, custom queries stays with “pending” status until the browser’s timeout.

On Digital Ocean, CPU usage hits 100%
Database has few lines and on Postbird (like PGAdmin) the query is running in milliseconds.
The error returned on browser is:

"status": "500",
  "message": "Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?",
  "stack": "KnexTimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?\n    at Client_PG.acquireConnection (/opt/node_app/node_modules/knex/lib/client.js:348:26)\n    at runMicrotasks (<anonymous>)\n    at runNextTicks (internal/process/task_queues.js:62:5)\n    at listOnTimeout (internal/timers.js:523:9)\n    at processTimers (internal/timers.js:497:7)"

HELP! (535.7 KB)

any tips @George and @patrick?
I created another docker machine on Digital Ocean and get the same error… It happens for custom queries… These queries are very fast on Postbird!!

My app doesn’t have any user, impossible to be a pool issue, right?


So you a running a custom query in server connect and when running it twice it doesn’t work?

Is it just the server action or your page? Can you try to isolate it just to the server action.

Maybe more info about the custom query will help. What is inside?

Hey George! Thanks for your help!

Here is only the server action:

Here is a short video of this same query and another (bigger) on Postbird.

About the custom query: I have sub subqueries on both of them, in one of them, I’m using a view to create some joins inside a subquery. Nothing unsual.


Please post info about the server action and what is inside.

If the queries are the same then there should be no difference in executing

Still stuck with this, @George…very frustrating…
I changed the host to Amazon AWS, when is just me testing the app on live server it is ok, when there are other users, the app becomes veeery slow, timeout for server action and pool message errors need a guidance here, please…plus, AWS container shows timeout error and the reset is not completed.

Fixed in Wappler 5.2.0

1 Like

This topic was automatically closed after 32 hours. New replies are no longer allowed.