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

AbstractConnectionListener#isTimedOut can return false for timed out connections

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.5.19.Final, 3.0.11.Final
    • 3.0.10.Final, 1.5.18.Final
    • None
    • None

      Changes made in JBJCA-1490 have resulted in timed out connections not being closed due to lastCheckedOut and lastReturned being equal:

      2024-09-19 16:53:23,053 INFO  [connectionmanager.listener.TxConnectionListener] lastCheckout: [1726757333153] lastReturned [1726757333153] timeout [1726757423049]
      2024-09-19 16:53:23,053 INFO  [connectionmanager.listener.TxConnectionListener] lastCheckout: [1726757333154] lastReturned [1726757333154] timeout [1726757423049]
      2024-09-19 16:53:23,053 INFO  [connectionmanager.listener.TxConnectionListener] lastCheckout: [1726757333156] lastReturned [1726757333156] timeout [1726757423049]
      2024-09-19 16:53:23,053 INFO  [connectionmanager.listener.TxConnectionListener] lastCheckout: [1726757351060] lastReturned [1726757351063] timeout [1726757423049]
      2024-09-19 16:53:23,053 INFO  [connectionmanager.listener.TxConnectionListener] lastCheckout: [1726757351068] lastReturned [1726757351077] timeout [1726757423049]
      2024-09-19 16:53:23,053 INFO  [connectionmanager.listener.TxConnectionListener] lastCheckout: [1726757580006] lastReturned [1726757580010] timeout [1726757423049]
      2024-09-19 16:53:23,064 INFO  [connectionmanager.listener.TxConnectionListener] lastCheckout: [1726757351110] lastReturned [1726757351130] timeout [1726755803064]
      

      (logging added in a local build of 3.0.9.Final)

      these connections then sit in the pool only timing out when the mariadb wait_timeout is hit, causing flods of Iron Jacamar WARNs in the logs, and eventually getting the pool into an odd state where transactions are not committed.

      Our connection pool configuration is validate on match:

      <validation>
        <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/>
        <validate-on-match>true</validate-on-match>
        <use-fast-fail>false</use-fast-fail>
        <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/>
      </validation>
      <timeout>
        <idle-timeout-minutes>3</idle-timeout-minutes>
        <allocation-retry>3</allocation-retry>
      </timeout>
      

              tadamski@redhat.com Tomasz Adamski
              getwellnetwork Bernd Nigmann (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: