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

Meteor doesn't reconnect to mongo #425

Closed
tsgautier opened this Issue Oct 26, 2012 · 3 comments

Comments

Projects
None yet
2 participants
@tsgautier

tsgautier commented Oct 26, 2012

[in mongo shell]
$ mongod

[in meteor shell
$ meteor create --example leaderboard
$ export MONGO_URL="mongo://localhost"
$ cd leaderboard
$ meteor
==> see that the example works

[in mongo shell]
ctrl-c
$ mongod

Results in this error:
Internal exception while processing message { msg: 'connect' } Error: no open connections
at Object.Future.wait (/usr/local/meteor/lib/node_modules/fibers/future.js:319:16)
at _Mongo.Cursor._nextObject (app/packages/mongo-livedata/mongo_driver.js:295:45)
at _Mongo.Cursor.forEach (app/packages/mongo-livedata/mongo_driver.js:312:20)
at _Mongo.Cursor.map (app/packages/mongo-livedata/mongo_driver.js:324:8)
at _Mongo.Cursor.fetch (app/packages/mongo-livedata/mongo_driver.js:341:15)
at _Mongo.LiveResultsSet._doPoll (app/packages/mongo-livedata/mongo_driver.js:468:33)
at new _Mongo.LiveResultsSet (app/packages/mongo-livedata/mongo_driver.js:419:8)
at _Mongo.Cursor.observe (app/packages/mongo-livedata/mongo_driver.js:360:10)
at _.extend._publishCursor (app/packages/livedata/livedata_server.js:632:33)
at sub._runHandler (app/packages/livedata/livedata_server.js:370:13)
- - - - -
at Db._executeQueryCommand (/usr/local/meteor/lib/node_modules/mongodb/lib/mongodb/db.js:1726:14)
at Cursor.nextObject (/usr/local/meteor/lib/node_modules/mongodb/lib/mongodb/cursor.js:530:13)
at Future.wrap as _synchronousNextObject
at _Mongo.Cursor._nextObject (app/packages/mongo-livedata/mongo_driver.js:295:20)
at _Mongo.Cursor.forEach (app/packages/mongo-livedata/mongo_driver.js:312:20)
at _Mongo.Cursor.map (app/packages/mongo-livedata/mongo_driver.js:324:8)
at _Mongo.Cursor.fetch (app/packages/mongo-livedata/mongo_driver.js:341:15)
at _Mongo.LiveResultsSet._doPoll (app/packages/mongo-livedata/mongo_driver.js:468:33)
at new _Mongo.LiveResultsSet (app/packages/mongo-livedata/mongo_driver.js:419:8)
at _Mongo.Cursor.observe (app/packages/mongo-livedata/mongo_driver.js:360:10)
Internal exception while processing message { msg: 'connect' } Error: no open connections
at Object.Future.wait (/usr/local/meteor/lib/node_modules/fibers/future.js:319:16)
at _Mongo.Cursor._nextObject (app/packages/mongo-livedata/mongo_driver.js:295:45)

And the app is forever broken :(

@tsgautier

This comment has been minimized.

tsgautier commented Oct 26, 2012

as noted by David Glasser, using the following url works as expected:

export MONGO_URL="mongo://localhost/?autoReconnect=true"

@glasser

This comment has been minimized.

Member

glasser commented Nov 1, 2012

Choices here are to always append autoReconnect=true to the provided MONGO_URL, or to just document this better. Is there ever a use case for not having autoReconnect=true? Why isn't this the default in Mongo?

@glasser glasser closed this in 31be7d6 Dec 4, 2012

@glasser

This comment has been minimized.

Member

glasser commented Dec 4, 2012

If for some reason you don't want autoReconnect, you can include autoReconnect=false in your MONGO_URL, but if you don't, Meteor will now add autoReconnect=true. Thanks @tsgautier for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment