-
Notifications
You must be signed in to change notification settings - Fork 42
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
MySQL connection 8 hours timeout issue #43
Comments
|
Thank you!. Does that means I will not run into the connection closed error with the nonBlocking pool when I query DB after 8 hours of idle since it will create a new connection on health check? |
Yes, that's what should happen.
Possibly. For example in our corporate environment F5 chops idle TCP connections after 30 mins. It will depend on your network.
As above, it may happen because there is no health-check. The way to prevent it would be to use a non-blocking connection pool or use a blocking connection pool on top of another pool like Hikari (and get it to do the health check). |
Thank you again! Just to confirm the 3rd question, if I were to use a blocking pool on top of a Hikari pool, I just need to pass a HikariDataSource to Database.fromBlocking right? like below code where ds is a HikariDataSource.
|
Yep but use a singleton |
MySQL close idle connections after 8 hours. I have 2 questions regarding this.
in application.properties
The text was updated successfully, but these errors were encountered: