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.
- causes
-
DRIVERS-2398 Limit mongos Hosts for Implicit Session Prose Test
- Implementing
- is duplicated by
-
DRIVERS-2126 Drivers should check out an implicit session only after checking out a connection
- Closed
- is related to
-
DRIVERS-2218 Clarify intended bounding of implicit session allocation and rework flaky prose test
- Closed
- related to
-
JAVA-3856 Database connection error is not notified or notified after server selection timeout.
- Closed
-
DRIVERS-2126 Drivers should check out an implicit session only after checking out a connection
- Closed
- split to
-
JAVA-4365 Check out an implicit session only after checking out a connection
- Closed
-
RUST-1069 Drivers should check out an implicit session only after checking out a connection
- Closed
-
CDRIVER-4197 Drivers should check out an implicit session only after checking out a connection
- Closed
-
CSHARP-3927 Drivers should check out an implicit session only after checking out a connection
- Closed
-
CXX-2398 Drivers should check out an implicit session only after checking out a connection
- Closed
-
GODRIVER-2197 Drivers should check out an implicit session only after checking out a connection
- Closed
-
MOTOR-841 Drivers should check out an implicit session only after checking out a connection
- Closed
-
NODE-3697 Check out an implicit session only after checking out a connection
- Closed
-
PHPLIB-747 Drivers should check out an implicit session only after checking out a connection
- Closed
-
PYTHON-2956 Drivers should check out an implicit session only after checking out a connection
- Closed
-
RUBY-2820 Check out an implicit session only after checking out a connection
- Closed