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

Reconnect to mongo indefinitely. #7880

Merged
merged 2 commits into from Oct 7, 2016
Merged

Conversation

tmeasday
Copy link
Contributor

@tmeasday tmeasday commented Oct 7, 2016

I'm not sure if we want to do a point release for this one, or just release a new version of the mongo package and sweep it up in the next release.

AFAICT, fixes #7822, and possibly various other mongo-related bugs I've been hearing about.

A fix for #7822

It seems the driver now always autoReconnects, but only for 30s.

To get the old (sensible) behavior of endlessly reconnecting, we set `reconnectTries` to 0.
@tmeasday
Copy link
Contributor Author

tmeasday commented Oct 7, 2016

If we do a point release, I should rename this branch to release-1.4.1.3.

If not, we should cherry-pick this commit to devel and release-1.4.2

@tmeasday tmeasday force-pushed the 7822-mongo-reconnect-settings branch from 3dc9fa5 to ce2c284 Compare October 7, 2016 02:54
@tmeasday
Copy link
Contributor Author

tmeasday commented Oct 7, 2016

Published mongo@1.1.12-2-rc.0 if people want to test it out in the meantime.

(Due to vagaries in version ordering, you'll need to put mongo@=1.1.12-2-rc.0 in your .meteor/packages to use it)

@benjamn
Copy link
Contributor

benjamn commented Oct 7, 2016

Can you add a note about this to History.md?

@benjamn benjamn changed the base branch from master to devel October 7, 2016 19:27
@benjamn benjamn changed the base branch from devel to master October 7, 2016 19:30
@benjamn benjamn changed the base branch from master to devel October 7, 2016 19:46
@benjamn benjamn merged commit 0ffb9ac into devel Oct 7, 2016
@glasser
Copy link
Contributor

glasser commented Oct 7, 2016

Is this in a released mongo yet?

@benjamn
Copy link
Contributor

benjamn commented Oct 7, 2016

Yes, I've published it as mongo@1.1.12_3.

benjamn added a commit that referenced this pull request Oct 8, 2016
Setting mongoOptions.server.auto_reconnect was removed by #7880 via commit
0ffb9ac, though it seems the Server
options still respect autoReconnect, even in version 2.2 of the driver:
http://mongodb.github.io/node-mongodb-native/2.2/api/Server.html

That said, having inspected the code of the `mongodb` package, I do not
believe this change is really critical, since the default value for
autoReconnect appears to be true.

More importantly, I can't find any support in the code of the `mongodb`
npm package or its dependencies for the claim that setting
mongoOptions.server.reconnectTries to 0 is the same as making it infinite,
so this commit sets it to Infinity.
benjamn pushed a commit that referenced this pull request Oct 21, 2016
* Reconnect to mongo indefinitely.

A fix for #7822

It seems the driver now always autoReconnects, but only for 30s.

To get the old (sensible) behavior of endlessly reconnecting, we set `reconnectTries` to 0.

* Releasing an rc of mongo package
benjamn added a commit that referenced this pull request Oct 21, 2016
Setting mongoOptions.server.auto_reconnect was removed by #7880 via commit
0ffb9ac, though it seems the Server
options still respect autoReconnect, even in version 2.2 of the driver:
http://mongodb.github.io/node-mongodb-native/2.2/api/Server.html

That said, having inspected the code of the `mongodb` package, I do not
believe this change is really critical, since the default value for
autoReconnect appears to be true.

More importantly, I can't find any support in the code of the `mongodb`
npm package or its dependencies for the claim that setting
mongoOptions.server.reconnectTries to 0 is the same as making it infinite,
so this commit sets it to Infinity.
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

Successfully merging this pull request may close these issues.

Mongo driver loses connection with error "MongoError: server instance pool was destroyed"
3 participants