New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: conn.openUri(...).then is not a function #9335
Comments
While switching to Mongoose 5.10, I had the same problem. |
Ok, good to know it's not just me. Did you find a way to fix it, except downgrading? 5.10 seems to be the latest. |
Looking through the history there is this commit attempting to fix a re-connection/multi-connection issue. It introduces a Lines 662 to 673 in 25cdb95
|
Using
|
Have you tried closing the connection after doing what you have to do with the data? I was having the same bug but after a reaaaaally long time I found this issue (#9151) explaining that thing with closing connections with this new version of mongoose. |
it seems to be that once the connection is set up, the related to #8810 |
Sorry for the trouble, fix will be in 5.10.1 👍 |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
I'm using the following to connect to MongoDB via Mongoose:
Once I run the script with around 20-100 connections, I start getting the following error:
I can't figure out what is causing this.
If the current behavior is a bug, please provide the steps to reproduce.
Look at the above. I can't replicate this reliably because it occurs only when there is a lot of connections and data flying.
What is the expected behavior?
There wouldn't be an error.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Node 12.16.3, Mongoose 5.10, Mongo 3.6.9.
The text was updated successfully, but these errors were encountered: