Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-543

PoolManager#refresh Causes MongoReplicaSetClient to Exceed Max Pool Size

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 1.8.3
    • Affects Version/s: 1.8.1, 1.8.2
    • Component/s: None
    • None

      Due to a logic bug introduced into PoolManager#refresh, it was creating a new socket pool unnecessarily and failing to clean up any open sockets under certain conditions.

      In a multi-threaded environment, this was causing new socket pools to be opened up constantly and connections counts to skyrocket well past the specified max pool size.

      The issue was introduced here:
      https://github.com/mongodb/mongo-ruby-driver/commit/92e862bf1e57398b4ecb4f0f0e56b0d560e73901#L1L54

      A test case for reproducing the issue is attached.

            Assignee:
            tyler@10gen.com Tyler Brock
            Reporter:
            brandon.black@10gen.com Brandon Black
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: