CSOT Client-Side Operations Timeout
Parent: MongoDB Connection String URI · Published reference · snapshot 2026-10-23 · skill mongodb-cohort-6f6a12e41dfc
↓ Facts as markdownall context files
Source-anchored research for CSOT Client-Side Operations Timeout. Run status: COMPLETED.
These notes link each claim to its source. Some citations identify archived research reports that are no longer hosted on this site. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.
How it works
- When `timeoutMS` is set, the Node.js and Java Sync driver guides say it takes precedence over legacy timeout settings including `socketTimeoutMS`, `waitQueueTimeoutMS`, `wTimeoutMS`, `maxTimeMS`, and `maxCommitTimeMS`; operation-level and other narrower-scope `timeoutMS` values can override broader settings. (high confidence) (verified as of 2026-10-23) [source]
Problems, failure modes and limitations
- CSOT (`timeoutMS`) is a best-effort per-operation time budget. Drivers track the remaining time across blocking phases such as server selection, connection checkout and establishment, and server execution, then return a timeout error when the budget expires. (high confidence) [source]
- An AI-assisted third-party error reference, analyzing a Node.js driver commit from 2026-08-11, associates a server `MaxTimeMSExpired` response under CSOT with `MongoOperationTimeoutError` and says the original server error remains available as the cause; verify the exact error class against the deployed driver version. (low confidence) (verified as of 2026-08-11) [source]
- When `timeoutMS` is set in a connection string, it applies to every operation on that client, takes precedence over older timeout options, and may be overridden at a more specific level; the inherited value cannot be unset. (high confidence) [source]
- For command execution, the CSOT specification derives server-side `maxTimeMS` from the remaining client budget and the selected server's minimum round-trip time. In the Node.js driver, a server-reported max-time expiry under CSOT is converted to `MongoOperationTimeoutError`, retaining the server error as its cause. (medium confidence) [source]
- A MongoDB driver tracking issue recorded a connection-churn failure mode for short operation timeouts: the client socket timeout could occur before the server returned its `MaxTimeMSExpired` response, leading drivers that closed timed-out connections to reopen them. The issue identified low-timeout, high-volume workloads as especially exposed. (low confidence) [source]
Facts and statements
- The Node.js and Java Sync drivers accept `timeoutMS` in a connection string URI query, for example `mongodb://<host>:<port>/?timeoutMS=30000`; support must be checked for the specific driver in use. (high confidence) (verified as of 2026-10-23) [source]
- In the Java Sync driver's documented behavior, `timeoutMS` is unset by default, a positive value bounds operation completion, and `0` means operations do not time out; the CSOT specification likewise says an unset value leaves existing timeout behavior in place and `0` means infinite, though some specific client-side timeouts can still apply. (high confidence) [source]
- The current MongoDB Node.js driver v7.x and Java Sync driver v5.x CSOT guides label the feature experimental and warn that its behavior might change in future releases. (high confidence) (verified as of 2026-10-23) [source]
- MongoDB driver tickets report that network and server latency variation can still make the client hit its socket timeout before reading the server's `MaxTimeMSExpired` response, causing connection churn. A Go Driver experiment reported that with CSOT budgets below one second, no derived `maxTimeMS` value allowed the server to respond before the client deadline. (medium confidence) (verified as of 2026-07-22) [source]
- Spring Data MongoDB's issue tracker has an open, pending-design enhancement request to add CSOT support, while the underlying Java Sync driver documents CSOT; Java driver support therefore does not by itself establish that a framework exposes the setting. (medium confidence) (verified as of 2026-10-23) [source]
- `timeoutMS` covers an operation, while `connectTimeoutMS` limits an attempt to establish a connection and `socketTimeoutMS` limits an individual socket send or receive. If `timeoutMS` is unset, drivers continue to use the narrower timeout options they support. (high confidence) [source]
- Support and feature status vary by driver and integration. As of 2026-10-23, the MongoDB Manual warns that not all official drivers support `timeoutMS`, the Node.js driver page labels CSOT experimental, and Spring Data MongoDB issue #5003 remains open with pending design work for support. (medium confidence) (verified as of 2026-10-23) [source]
Children
- CSOT and maxTimeMS interaction (frontier)
- CSOT connection churn after client-side timeouts (frontier)
- CSOT driver and framework support (frontier)
- timeoutMS URI option and inheritance (frontier)
- CSOT interaction with server-side maxTimeMS (frontier)
Frontier under this node: CSOT and maxTimeMS interaction, CSOT connection churn after client-side timeouts, CSOT driver and framework support, CSOT interaction with server-side maxTimeMS, timeoutMS URI option and inheritance