Stephen Fikes created JBJCA-1402:
------------------------------------
Summary: Failure to set query timeout for validation may result in long
blocks of the pool
Key: JBJCA-1402
URL:
https://issues.redhat.com/browse/JBJCA-1402
Project: IronJacamar
Issue Type: Bug
Components: Core
Affects Versions: 1.4.10
Reporter: Stephen Fikes
Validation queries run [without any explicit query
timeout|https://github.com/ironjacamar/ironjacamar/blob/ironjacamar-1.4.1...].
If the validation query blocks (as it will with most drivers when a connection is
invalid/stale), this can block the entire pool in certain cases (e.g.
{{background-validation}} locks the pool during validation). Even with
{{validate-on-match}}, the failure to enforce a short timeout can significantly impact
time to get a connection if one or more failed connections are found in the pool.
Setting a driver level query timeout is not a suitable workaround because this impacts
normal queries that may be expected to run for significant periods. The timeout for normal
queries needs to be different from what is tolerated for validation queries (which should
respond nearly instantaneously or else the connection is likely broken).
An explicit query timeout should be supplied. It might also be useful if a pool property
or perhaps a system property could support a configurable timeout period (e.g. to account
for potential latency in some systems). The Apache Tomcat pool support something of this
nature with the
[
validationQueryTimeout|https://tomcat.apache.org/tomcat-9.0-doc/jdbc-pool...]
property.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)