Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1792

Dial TCP failure with concurrent queries

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.4.1
    • Component/s: Connections, Networking
    • None
    • Environment:
      Windows 64 bit

      I have an application that spins up a lot of concurrent queries to the database across multiple threads. To begin with it happily queries and returns successfully within a few milliseconds for each query. However, after a short while of running (approx. 30 seconds), the `collection.Find` command begins returning the following error intermittently:

      connection() : dial tcp 127.0.0.1:27017: connectex: Only one usage of each socket address (protocol/network address/port) is normally permitted.

      This kind of network error would usually imply to me that it was trying to listen on that socket but the socket was already in use - not sure how that really applies in the network level of the mongo go driver though?

       

      Each separate part of the application does its own `mongo.Connect` and then calls `client.Disconnect` when it is completed. There are only ever around a dozen or so clients connected at the same time, but its fair to say that a lot of separate queries will be taking place on the clients concurrently, as well as multiple clients being around while in use.

       

      Is this a bug or am I doing something wrong?

            Assignee:
            Unassigned Unassigned
            Reporter:
            lotawif879@aalyaa.com Liam Brown
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: