-
Notifications
You must be signed in to change notification settings - Fork 356
No connections in poll available when performing multiple queries in parallel #1000
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
Comments
You don't have a The fix should be simply to add Could you please verify, that the method works with proper transaction configuration? |
Sorry, I saw you actually wrote, that it works with transactions. About the documentation saying
Yeah, I guess that is misleading. This refers only to the methods provided by the |
Yes, as I wrote with So, if understood correctly, if no Is there a reason why Transactional behaviour is not a default one ? Thanks for quick response ;) |
Yes, your understanding is correct. I'll take the question about the default behaviour to the team. |
When performing
n
repository queries in parallel, wheren >= maximumPoolSize
, all queries seems to be stuck and hikaricp pool do not have free connections. Getting error:Preconditions:
@Trasactional
annotation is not addedI have made small demo project to showcase this problem:
https://github.com/zygisx/demo-spring-data-jdbc-problem
As you can see database aggregate contains 1-n relationship UserEntity -> UserEmailAddress: link
Whenever i add
@Transactional
annotation to repository problem is gone. Though spring-data-jdbc documentation states that:Tests in demo project showcases this issue
https://github.com/zygisx/demo-spring-data-jdbc-problem/blob/main/src/test/kotlin/com/example/demo/DemoApplicationTests.kt
When hikaricp
maximumPoolSize
is 10. Tests which performs 9 parallel calls to Repository passes.Though test which performs 10 parallel calls to repository fails with
HikariPool-1 - Connection is not available, request timed out after 30002ms.
.If You see that i can provide more info regarding this issue feel free to contact me.
Thanks for looking into it ;)
The text was updated successfully, but these errors were encountered: