Skip to content
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

Make queue for Hikari instead Of throw SQL Exception when reached max active Connection #2214

Open
cuong02n opened this issue Jul 7, 2024 · 1 comment

Comments

@cuong02n
Copy link

cuong02n commented Jul 7, 2024

I am using Spring boot with HikariDataSource, this is my config

spring.datasource.hikari.maximum-pool-size=50
spring.datasource.hikari.minimum-idle=50
spring.datasource.hikari.idle-timeout=0
spring.datasource.hikari.max-lifetime=0
spring.datasource.hikari.connection-timeout=2000
spring.datasource.hikari.leak-detection-threshold=0
spring.datasource.hikari.keepalive-time=0

But my application need perfomance. When it about 400 concurrent request and make query to database, request create new connection. And there are errors:

Connection is not available, request timed out after 30437ms (total=50, active=50, idle=0, waiting=37)
Connection is not available, request timed out after 30437ms (total=50, active=50, idle=0, waiting=36)
Connection is not available, request timed out after 30437ms (total=50, active=50, idle=0, waiting=35)

The exception:

CannotCreateTransactionException: Could not open JPA EntityManager for transaction
 
I want to make the whole application query in 50 connections, and those connections not shutdown, no create more, and if there is a request, it should wait before another request.

@singh972509
Copy link

Can I get assigned with this task?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants