mongodb
connection_error
ai_generated
true
MongoNetworkTimeoutError: connection timed out
ID: mongodb/network-timeout
78%Fix Rate
82%Confidence
3Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 7 | active | — | — | — |
Root Cause
Network timeout connecting to mongod/mongos.
genericWorkarounds
-
88% success Check network connectivity and DNS resolution to MongoDB host
-
85% success Tune connectTimeoutMS and serverSelectionTimeoutMS appropriately
Dead Ends
Common approaches that don't work:
-
Set socketTimeoutMS to 0 (infinite)
85% fail
Hangs forever on dead connections
-
Retry immediately in loop
78% fail
Overwhelms recovering server