MongoNetworkTimeoutError
Node.jsMongoNetworkErrorconnectivitynetworkingtimeout
A network operation timed out (socket timeout or connect timeout exceeded)
What is happening?
MongoNetworkTimeoutError is a subclass of MongoNetworkError that specifically indicates a timeout — either a socket read/write timeout or a connection establishment timeout. The driver closes the connection when this occurs.
Common causes
- socketTimeoutMS too low for long-running operations
- connectTimeoutMS too low for distant or slow servers
- Server overloaded and not responding within the timeout
- Network latency spike
- Large query result causing slow transfer
- Server-side operation blocking (e.g. lock contention)