261 — TooManyLogicalSessions
configurationperformance
The server has too many active logical sessions
What is happening?
TooManyLogicalSessions is returned when the server's logical session cache has reached its limit. Each driver connection that uses sessions creates an entry in the config.system.sessions collection. If too many sessions accumulate — often from connection churn, misconfigured connection pools, or session leaks — the server rejects new session creation.
Common causes
- Connection pool creating a new session per connection without reuse
- Application not ending sessions explicitly, causing accumulation
- Many short-lived application instances each creating sessions
- localLogicalSessionTimeoutMinutes set too high, causing sessions to persist