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:

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.
So it looks like you can use 'connectTimeoutMS' in a connection string, but you have to use 'connect_timeout_ms' attribute directly.

Hope this helps!


The way forward always starts with a minimal test.

In reply to Re: Mongodb query always quit with error by 1nickt
in thread Mongodb query always quit with error by Logo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.