Skip to content
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

Mongoose Update to 5 or 6 #163

Open
nidhinprathap opened this issue Feb 17, 2022 · 0 comments
Open

Mongoose Update to 5 or 6 #163

nidhinprathap opened this issue Feb 17, 2022 · 0 comments

Comments

@nidhinprathap
Copy link

nidhinprathap commented Feb 17, 2022

Hi, I have an application running on the old Mean stack. I wanted to upgrade the mongoose version to 5/6. The issue is once I upgrade I get the following error

MongooseError: Operation x.findOne() buffering timed out after 10000ms at Timeout.setTimeout (api/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:198:23)

not sure how to overcome this. I tried a couple of solutions mentioned in StackOverflow regarding the mongoose update, but nothing helps. If someone can just point out how can i get it fixed, it will be great

My gut feel is that its an issue with
Promises and Callbacks for mongoose.connect()
mongoose.connect() and mongoose.disconnect() now return a promise if no callback specified, or null otherwise. It does not return the mongoose singleton.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant