BTM
  1. BTM
  2. BTM-73

Connection Pool monitoring and management

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.3
    • Fix Version/s: 2.1.1
    • Labels:
      None
    • Number of attachments :
      2

      Description

      Add a JMX bean to manage/monitor a connection pool:

      • start/stop operation to free connections and disable connection distribution
      • active/idle connection count attribute to monitor connection pool usage

        Activity

        Hide
        Gérald Quintana added a comment -

        I can see in Source Repository that the Pooling Connection DataSource is a JMX Bean but I can't see it JConsole. Is it fixed in 2.0 but not in 1.3?

        Show
        Gérald Quintana added a comment - I can see in Source Repository that the Pooling Connection DataSource is a JMX Bean but I can't see it JConsole. Is it fixed in 2.0 but not in 1.3?
        Hide
        Ludovic Orban added a comment -

        Part of this enhancement has been reported in BTM-32 and has been implemented.

        Show
        Ludovic Orban added a comment - Part of this enhancement has been reported in BTM-32 and has been implemented.
        Hide
        Gérald Quintana added a comment -

        We currently have (and it's already nice):

        • Total Pool: meaning Opened Connections?
        • In Pool: meaning Available Connections?

        But we are really missing:

        • Min/Max: as defined in configuration (may be read-only)
        • In Use: meaning Opened but not Available

        Because we would like to trigger an alert when "In Use" reaches "Max"

        Show
        Gérald Quintana added a comment - We currently have (and it's already nice): Total Pool: meaning Opened Connections? In Pool: meaning Available Connections? But we are really missing: Min/Max: as defined in configuration (may be read-only) In Use: meaning Opened but not Available Because we would like to trigger an alert when "In Use" reaches "Max"
        Hide
        Ludovic Orban added a comment -

        A candidate build with those features is available here: https://nexus.codehaus.org/content/repositories/snapshots/org/codehaus/btm/btm/2.1.1-BTM-73-SNAPSHOT/

        Here's a bit of explanation about the new JMX attributes:

        minPoolSize read-only configured minPoolSize
        maxPoolSize read-only configured maxPoolSize
        inPoolSize read-only amount of free connections currently in the pool
        totalPoolSize read-only total amount of connections currently in pool, ie: in use + free ones
        disabled read-write when set to true, calling PoolingDataSource.getConnection() throws a SQLException

        Could you please give a try to those new features and report back if they work as you expect them to?

        Thanks,
        Ludovic

        Show
        Ludovic Orban added a comment - A candidate build with those features is available here: https://nexus.codehaus.org/content/repositories/snapshots/org/codehaus/btm/btm/2.1.1-BTM-73-SNAPSHOT/ Here's a bit of explanation about the new JMX attributes: minPoolSize read-only configured minPoolSize maxPoolSize read-only configured maxPoolSize inPoolSize read-only amount of free connections currently in the pool totalPoolSize read-only total amount of connections currently in pool, ie: in use + free ones disabled read-write when set to true, calling PoolingDataSource.getConnection() throws a SQLException Could you please give a try to those new features and report back if they work as you expect them to? Thanks, Ludovic
        Hide
        Gérald Quintana added a comment -

        I setup btm-2.1.1-BTM-73-20101108.152249-3. It looks like a very nice improvement.
        What's the purpose of failed flags?

        I am going to to set it up QA servers for in deep testing

        Show
        Gérald Quintana added a comment - I setup btm-2.1.1- BTM-73 -20101108.152249-3. It looks like a very nice improvement. What's the purpose of failed flags? I am going to to set it up QA servers for in deep testing
        Hide
        Ludovic Orban added a comment -

        I forgot to comment on the failed attribute, here is what it's about:

        failed read-only true when a resource failed recovery

        This is just the exposure of yet another internal state of the connection pool which may be useful for monitoring. The transaction manager marks a pool as failed when the latter fails recovery and is subsequently quarantined. Each new attempt to get a connection from a failed pool will trigger an incremental recovery on it which can either succeed - making the pool available for use again - or fail again which makes the pool throw an exception when a connection is requested by application code.

        This state is completely internal and automatically managed, it is just exposed in JMX for completeness.

        Show
        Ludovic Orban added a comment - I forgot to comment on the failed attribute, here is what it's about: failed read-only true when a resource failed recovery This is just the exposure of yet another internal state of the connection pool which may be useful for monitoring. The transaction manager marks a pool as failed when the latter fails recovery and is subsequently quarantined. Each new attempt to get a connection from a failed pool will trigger an incremental recovery on it which can either succeed - making the pool available for use again - or fail again which makes the pool throw an exception when a connection is requested by application code. This state is completely internal and automatically managed, it is just exposed in JMX for completeness.
        Hide
        Ludovic Orban added a comment -

        Everything looks fine now, making this issue solved.

        Show
        Ludovic Orban added a comment - Everything looks fine now, making this issue solved.

          People

          • Assignee:
            Ludovic Orban
            Reporter:
            Gérald Quintana
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: