-
Notifications
You must be signed in to change notification settings - Fork 226
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
Global configurable timeouts #862
Comments
Having a global setting for it may be okay. However, I am not willing to have it so far. If you're using MySQL / PostgreSQL, both of them support socketTimeout parameter in JDBC URL. In my opinion, using it would be enough for most cases. |
The issue with |
I see. Fair enough. |
If we have the setting globally, having it per a connection pool would be straight-forward. I have one concern about the possible implementation. |
Yeah, I agree, the inconsistency is annoying. I can try to take a stab at this if it doesn't require any major refactoring. |
how is going with queryTimeoutSeconds? we need that feature as well |
We haven't implemented it yet. I'm open to pull requests from the community! By the way, I revisited this now and came to wonder if there is an equivalent setting in HikariCP. https://github.com/brettwooldridge/HikariCP The Commons DBCP has If HikariCP doesn't have such, there is no other way to ignore the queryTimeout value with it (we can output warnings tho). |
Currently, it seems that the only way to set a query timeout is to set the query timeout on each query or to capture the executor and cancel the underlying statement after a timeout.
It would be great if a default query timeout could be configured globally.
This could use the
setQueryTimeout
option, but it may be possible to handle this at the execution layer to avoid issues with drivers not supportingsetQueryTimeout
. I have not dug too deep into the scalikejdbc source code, but from what I have see, it seems the former may be easier.The text was updated successfully, but these errors were encountered: