Reputation: 185
I'm using Mongo server version 2.0.6 And the C# driver DLL version is: 1.3.1.4349
I'm using this connection string:
mongodb://a.b.c.d:27017,e.f.g.h:27017/abcd?connectTimeoutMS=30000;socketTimeoutMS=120000
The issue is that the flag socketTimeoutMS might not be honored, I think. Because if I set it to 1ms, then most of my queries should fail, right?
I hope I've understood this parameter correctly. Can anyone explain what might be going on?
Upvotes: 1
Views: 7240
Reputation: 18615
The socket timeout parameter is used to time out sockets that are waiting to read or write data. If your server accepts writes and responds with data for reads within 1ms your query will not fail. Also it depends on the underlying OS if such a low timeout is actually honored. It might cap it.
Relevant code :
Upvotes: 1