Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-37752

possible bug in the server (ignoring timeout, using hardcoded timeout,..) ?

    XMLWordPrintable

    Details

    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      i cant imagine. its a very big project.

      Show
      i cant imagine. its a very big project.

      Description

      hello together,
      im experiencing weird timeouts from mongodb or the perl driver, but i guess its the server. i already tried to debug and track down whats happening(also searched the perl driver for any occurence of this timeout)

      it seems its some hardcoded 20 second timeout..

      i got to this conclusion through my scripts.. they end up like this:

      [Thu Oct 25 01:26:57 2018] update_one @ collection foo..
      MongoDB::WriteError: Write results unavailable from 192.168.91.187:5000 due to Couldn't get a connection within the time limit
      script exit at: Don Okt 25 01:27:18 CEST 2018

      and that works exactly like this:

      print "[" . scalar localtime . "] collection (foo)..\n";
      my $col=$con->get_database("foo")->get_collection("foo");

      print "[" . scalar localtime . "] update_one @ collection foo..\n";
      $col->update_one({"foo" => foo},{'$addToSet' => { "foo" => foo }}); <= kills the script

      so the difference between the update call and the script exit is everytime 20 seconds..

      it happens not only with addtoset.

      i already connect to the the server with very high timeout values (for exact this debug purpose):

      $con= MongoDB::MongoClient->new(
      host => $constr,
      connect_timeout_ms => 1000 * 60 * 10, #10 minutes
      max_time_ms => 1000 * 60 * 60 * 3, #3 hours (max time for operation)
      server_selection_timeout_ms => 1000 * 60 * 60 * 1, #1 hour
      socket_timeout_ms => 1000 * 60 * 60 * 4, #4 hours (wait for reply)
      server_selection_try_once => 0,
      w => 1,
      wtimeout => 1000 * 60 * 60 * 1, #1 hour
      j => 0 );

      so the question is, where does this timeout come from and what can i do, except from try/catch to prevent these errors?

      im using MongoDB 3.6.5, and the Perl Driver 2.0.1 at Debian Stable.

      kind regards,
      Michael

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: