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

How to use reconnectTries and reconnectInterval options with v6.9.2 #13071

Closed
1 task done
mr-mad-e opened this issue Feb 22, 2023 · 2 comments · Fixed by #13083
Closed
1 task done

How to use reconnectTries and reconnectInterval options with v6.9.2 #13071

mr-mad-e opened this issue Feb 22, 2023 · 2 comments · Fixed by #13083
Labels
docs This issue is due to a mistake or omission in the mongoosejs.com documentation
Milestone

Comments

@mr-mad-e
Copy link

Prerequisites

  • I have written a descriptive issue title

Mongoose version

6.9.2

Node.js version

16.x

MongoDB version

4

Operating system

Linux

Operating system version (i.e. 20.04, 11.3, 10)

No response

Issue

Not able to use reconnectTries and reconnectInterval options in latest version.

Is there any alternate way to use it?

Why it is removed? didn't mention in migration guide

What is the default value for these options?

@mr-mad-e mr-mad-e added help This issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary help wanted labels Feb 22, 2023
@vkarpov15
Copy link
Collaborator

These options were removed in Mongoose 6. They're no longer necessary: the MongoDB node driver will always attempt to retry any operation for up to serverSelectionTimeoutMS, even if MongoDB is down for a long period of time. It will never end up in a state where it ran out of retries and will never try to reconnect to MongoDB.

We'll make a note of this in our docs.

@vkarpov15 vkarpov15 added this to the 6.9.4 milestone Feb 22, 2023
@vkarpov15 vkarpov15 added docs This issue is due to a mistake or omission in the mongoosejs.com documentation and removed help This issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary help wanted labels Feb 22, 2023
@mr-mad-e
Copy link
Author

@vkarpov15, thanks for the update

@mr-mad-e mr-mad-e reopened this Feb 23, 2023
lpizzinidev added a commit to lpizzinidev/mongoose that referenced this issue Feb 24, 2023
vkarpov15 added a commit that referenced this issue Feb 24, 2023
docs(migrating_to_6): added info about removal of reconnectTries and reconnectInterval options
hasezoey pushed a commit to hasezoey/mongoose that referenced this issue Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This issue is due to a mistake or omission in the mongoosejs.com documentation
Projects
None yet
2 participants