There are no objects available and the waitQueue is full
linusnorton opened this issue · 5 comments
I'm getting this error: There are no objects available and the waitQueue is full
in a long running script I have.
What are the reasons for it?
How can I avoid it?
@linusnorton Have you found solution for this?
No, I was unable to work out the cause or a fix.
The cause is most likely not giving connections back to the pool, so you either need a larger pool or close the connections.
I bumped into this issue as well. I was initially tempted to raise the queue limits again, but it doesn't sound like an acceptable solution as I can't predict how many queries I will be running simultaneously, and any number is potentially inadequate. I was kind of hoping for some sort of backpressure mechanism that would block or slow down my requests and prevent this runtime exception. Unless I am missing something obvious here, I am not sure what to do at this point, apart from (sadly) abandoning the idea to use this library.
We have fixed this issue in jasync fork of the lib. see this issue: jasync-sql/jasync-sql#41