Uploaded image for project: 'IronJacamar'
  1. IronJacamar
  2. JBJCA-1402

Failure to set query timeout for validation may result in long blocks of the pool

    XMLWordPrintable

Details

    • Feature Request
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 1.4.10
    • None
    • Core
    • None

    Description

      Validation queries run without any explicit query timeout. 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).

      Minimally, 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 supports something of this nature with the validationQueryTimeout property.

      Attachments

        Issue Links

          Activity

            People

              flaviarnn Flavia Rainone
              rhn-support-sfikes Stephen Fikes
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: