Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2126

Drivers should check out an implicit session only after checking out a connection

    XMLWordPrintable

Details

    • Needed

    Description

      Problem:
      When the number of concurrent application requests are larger than the number of available connections, the driver may generate many more implicit sessions than connections. For example with maxPoolSize=1 and 100 threads, 100 implicit sessions may be created. This increases the load on the server since session state is cached in memory. In the worst case this kind of workload can hit the session limit and trigger TooManyLogicalSessions.

      Proposed solution:
      Drivers should check out an implicit session only after checking out a connection. This change will limit the number of implicit sessions to no greater than an application's maxPoolSize (ignoring operations that hold on to the session like cursors).

      This change would not have any effect on explicit sessions created with startSession.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              shane.harvey@mongodb.com Shane Harvey
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: