in reply to Mongodb query always quit with error
Hi Logo,
I've not used this module myself, but is it possible you have your connection attributes named wrong? From the docs for MongoDB::MongoClient:
So it looks like you can use 'connectTimeoutMS' in a connection string, but you have to use 'connect_timeout_ms' attribute directly.connect_timeout_ms This attribute specifies the amount of time in milliseconds to wait fo +r a new connection to a server. The default is 10,000 ms. If set to a negative value, connection operations will block indefinit +ely until the server replies or until the operating system TCP/IP sta +ck gives up (e.g. if the name can't resolve or there is no process li +stening on the target host/port). A zero value polls the socket during connection and is thus likely to +fail except when talking to a local process (and perhaps even then). This may be set in a connection string with the 'connectTimeoutMS' opt +ion.
Hope this helps!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Mongodb query always quit with error
by Logo (Initiate) on May 19, 2016 at 06:47 UTC |