-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DB ERROR: pool timed out while waiting for an open connection in thread #3241
Comments
I solved it by following this guide. #3232 Is that the correct way to do it when working with threads? |
This seems like a bug. I recently started seeing this error after bumping |
* Check max lifetime in return_to_pool, not on acquire * Improve checks in backgrand maintenance task * add tests * adjust test to fix
I can reproduce this issue (sometimes) by having two threads that use the same connection at the same time. |
We have also encountered this issue with
Eventually we found the discussion at: #3232 And based on the comment from @maxcountryman, gave pinning to 0.7.3 a try. Our dependency now looks like:
After some testing we have not been able to reproduce the issue with 0.7.3. Either the issue really is not present in 0.7.3 or 0.73 causes the problem to happen with much less frequency with our workload. |
This is also happening to me in |
@benjamingb How did you solve it with actix web? |
Bug Description
When I try to make a query within a thread I get the following message
DB ERROR: pool timed out while waiting for an open connection
, it doesn't matter if I increase the waiting time or the connection pool it always does the sameMinimal Reproduction
This thread is invoked from another thread that is in an actor
This in turn invokes the other thread
Here I create my connection
This is how I define my connection
Info
[ "runtime-tokio-rustls", "bigdecimal", "macros", "postgres","uuid", "chrono", "migrate", "json" ]
rustc --version
: rustc 1.78.0 (9b00956e5 2024-04-29)The text was updated successfully, but these errors were encountered: