Skip to content

Try bumping up the reconnect retries and interval for MongoDB #845

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

Merged
merged 1 commit into from
Dec 6, 2015

Conversation

Martii
Copy link
Member

@Martii Martii commented Dec 6, 2015

  • Every couple of days we get disconnected and the below refs offer a possible suggestion
  • Doubling the default server.reconnectTries and quadrupling the wait time for reconnectInterval (4 seconds shouldn't be too bad instead of the default of 1)

Refs:

* Every couple of days we get disconnected and the below refs offer a possible suggestion
* Doubling the default `server.reconnectTries` and quadrupling the wait time for `reconnectInterval` *(4 seconds shouldn't be too bad instead of the default of 1)*

Refs:
* http://mongodb.github.io/node-mongodb-native/2.0/api/Server.html
* Automattic/mongoose#3588
@Martii Martii added bug You've guessed it... this means a bug is reported. DB Pertains inclusively to the Database operations. labels Dec 6, 2015
Martii added a commit that referenced this pull request Dec 6, 2015
Try bumping up the reconnect retries and interval for MongoDB

Auto-merge
@Martii Martii merged commit 1edc3f4 into OpenUserJS:master Dec 6, 2015
@Martii Martii deleted the tryDBConnectionOpts branch December 6, 2015 23:08
@Martii
Copy link
Member Author

Martii commented Dec 11, 2015

This appears on the surface to have improved things... restarted the server to get the most recent commits in... Will run this as a longer test and perhaps halfing the reconnectInterval at a later date. Need a good 30ish days though.

Martii pushed a commit to Martii/OpenUserJS.org that referenced this pull request Dec 16, 2015
* Set some DB options to their assumed defaults from http://mongodb.github.io/node-mongodb-native/2.0/api/Server.html ... relates to https://github.com/christkv/mongodb-core/issues/66#issuecomment-165052045
* Set some replset defaults to their assumed defaults from http://mongodb.github.io/node-mongodb-native/2.0/api/ReplSet.html ... relates to Automattic/mongoose#3588 (comment)
* Move/change a stderr message to debug mode of *node*... clear up the logs a bit since script source may not be found just yet. This only happens on pro so far and probably deals with streams not ready yet. Applies to OpenUserJS#430
* Move S3 source not found stderr to debug mode of *node*... known issue of OpenUserJS#486. Applies to OpenUserJS#430

**NOTES**
* This will be a test whereas unless it's a huge bug I can't take pro down for at least 3 days, give or take to see if this helps or hinders from OpenUserJS#845 backout.
Martii pushed a commit to Martii/OpenUserJS.org that referenced this pull request Dec 16, 2015
* Gracefully disconnect from MongoDB during restarts
* Add some console messages in for tracking
* Remove the `bind` on error trap

Applies to OpenUserJS#845, OpenUserJS#851, Automattic/mongoose#3588 and loosely christkv/mongodb-core#66
Martii pushed a commit to Martii/OpenUserJS.org that referenced this pull request Dec 18, 2015
* Change logic to only use `replset` on production ... as per Automattic/mongoose#3588 (comment) from @chrisckchang
* Default to single connection on development with `server` ... as per Automattic/mongoose#3588 (comment) from @chrisckchang
* Change `connectTimeoutMS` to 60 seconds instead of presumed inherited OS value from https://github.com/christkv/mongodb-core/issues/66#issuecomment-165052045 by @christkv and overridden with @chrisckchang recommendation previously mentioned in commit summary.
* Added NOTE on non-standard keepAlive value that was in before I started twiddling with this... this was on dev and pro pre replica/sharding set.

Applies to OpenUserJS#845, OpenUserJS#851, OpenUserJS#852, Automattic/mongoose#3588 and loosely christkv/mongodb-core#66

Refs:
* Automattic/mongoose#3588 (comment)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug You've guessed it... this means a bug is reported. DB Pertains inclusively to the Database operations.
Development

Successfully merging this pull request may close these issues.

1 participant