I'm writing a Go app using mongo-driver to connect to the mongo replica set.
I've noticed that mongo.Connect is not actually connect to the database.
Even if I've shutdown the mongod instance, mongo.Connect sill able to pass through.
However, when I do the query it will connect to the mongod instance.
Now my problem is I have a lot (>100) concurrent queries to different databases within the same mongod instance.
The driver create a whole bunch of connections and mongod failed me Too many files opened because there is too many connections, Even I use a single mongo.Client.
Is this a proper behavior of mongo_driver and how can I deal with this?
Does MongoDB require each connection per each database?