For every request I was opening the database, querying, closing the database.
I was sporadically running into a connection already opened
issue.
I ended up changing the configuration to just open mongo and keep it open.
What are the downsides to this method?
Thanks!
(note: using node.js)
I looks as if you should open the connection once and keep reusing it, at least with the node-native-driver. Comments on the subject by the driver's developer found here: https://github.com/mongodb/node-mongodb-native/issues/84
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With