Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major - P3 Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.12.0, 3.0.0
    • Component/s: Connection Management
    • Labels:
      None
    • # Replies:
      2
    • Last comment by Customer:
      false

      Description

      Add support for checking on unused resources in the pool so it can shrink over time (to the min pool size).

      This will work in conjunction with JAVA-710: support max connection idle time and connection life time.

      The connection pool will, at a configurable interval:

      1. prune all connections that exceed either the max idle or max life time
      2. ensure a minimum pool size

      By default:

      • min size == 0
      • interval == 1 minute

      The minimum size is configuration using the method com.mongodb.MongoClientOptions.Builder#minConnectionsPerHost and the minPoolSize query parameter on the Mongo URI. The interval is not currently configurable.

        Issue Links

          Activity

          Hide
          Scott Hernandez
          added a comment -

          It would be good to implement a minSize and minToKeep options as well to control this. minSize will be the number allocated when the pool is created and minToKeep will be the low water mark on contraction.

          Show
          Scott Hernandez
          added a comment - It would be good to implement a minSize and minToKeep options as well to control this. minSize will be the number allocated when the pool is created and minToKeep will be the low water mark on contraction.
          Hide
          Jeff Yemin
          added a comment -

          Hi there,

          Interested parties can test the fix with 2.12.0-rc0, available either on github or Maven Central. Any takers?

          Thanks,
          Jeff

          Show
          Jeff Yemin
          added a comment - Hi there, Interested parties can test the fix with 2.12.0-rc0, available either on github or Maven Central . Any takers? Thanks, Jeff

            People

            • Votes:
              5 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                7 weeks ago
                Date of 1st Reply: