Update semaphore limit if connectionsPerHost or threadsAllowedToBlockForConnectionMultiplier changed after construction

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.7.3
    • Component/s: Connection Management
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      User reports writing:

      Mongo mongo = new Mongo("127.0.0.1", 27017);
      mongo.getMongoOptions().connectionsPerHost = 100;
      mongo.getMongoOptions().threadsAllowedToBlockForConnectionMultiplier = 5;
      

      ... and then spinning up 100 threads, getting "out of semaphores" error. If options are set before constructing the Mongo instance, semaphore limit is large, as expected. Semaphore limit should be updated after construction if connectionsPerHost or threadsAllowedToBlockForConnectionMultiplier changes.

            Assignee:
            Unassigned
            Reporter:
            A. Jesse Jiryu Davis
            None
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: