Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-794

When try to test connection to mongodb server, connection is hanging - need to implement a timeout mechanism

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • 1.4
    • None
    • None
    • Windows 7 x64, Windows Server 2008 R2

    Description

      I use Mongo db C# driver 1.4.0.4468.
      MongoDB it is installed as a windows service an a machine.
      The command that I used to install the service is : "C:\Program Files (x86)\Ixia\ResourceManager\Mongodb\bin\mongod.exe" --journal --dbpath "C:\ProgramData\Ixia\ResourceManager\Storage\Database" --logpath "C:\ProgramData\Ixia\ResourceManager\Logs\mongod.log" --service --logappend"
      When Windows network setting: "Receive Window Auto-Tuning Level" it is set to "experimental" value, no connections can be made to database using C# driver. To set this value you need to open an admin cmd and type command: netsh int tcp set global autotuninglevel=experimental
      After mongodb service it is installed I test connectivity with the database.
      I used MongoDB.Driver.MongoServer.Connect(TimeSpan timeout) method to test if mongodb server is started. Even this method has a timeout parameter, the execution hangs in this method.
      You need to fix this problem and to have a time out mechanism to throw an error if no connection can be made.
      I attached mongod.log and a capture file to see the packets sent.

      Attachments

        1. loopback.pcap
          2 kB
        2. mongod.log
          2 kB

        Activity

          People

            Unassigned Unassigned
            gabi_badescu Gabriel Badescu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: