Details
-
Bug
-
Resolution: Works as Designed
-
Major - P3
-
None
-
1.4.1
-
None
-
Windows 64 bit
Description
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?