-
Type: Spec Change
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Component/s: Sessions
-
Needed
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.
- duplicates
-
DRIVERS-1030 Drivers should check out an implicit session only after checking out a connection
- Closed
- is related to
-
NODE-2216 Logical Sessions grow continuously when replicaset is under load
- Closed
-
DRIVERS-1030 Drivers should check out an implicit session only after checking out a connection
- Closed