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

whole server goes down with an exception when a connection to mongo is lost #7

Open
svasva opened this issue Oct 21, 2012 · 1 comment

Comments

@svasva
Copy link

svasva commented Oct 21, 2012

Can be reproduced in those steps:

  1. create an empty derby app.
  2. replace default memory store with racer-db-mongo store:
store = derby.createStore
  listen: server
  db: {type: 'Mongo', uri: 'mongodb://localhost/database', safe: true}
  1. launch node server.js & open it in browser
  2. now terminate the mongo process
  3. refresh the browser window - server is dead now with an exception like this:
a87d725f-5012-4ad5-84b6-f26b089c3e35  ver: 1 - set 'rooms.5q979f.visits', 1
a87d725f-5012-4ad5-84b6-f26b089c3e35  "txnErr": [ [Error: no open connections],
  'a87d725f-5012-4ad5-84b6-f26b089c3e35.75' ]

/Users/erundook/Sites/dtest/node_modules/derby/node_modules/racer/lib/txns/txns.Model.js:319
          return txn.callback(err, txn);
                     ^
TypeError: Property 'callback' of object 5,84ad09d3-dfb8-4508-9a70-31ab5b47885d.1,set,rooms.5q979f.welcome,Welcome to 5q979f! is not a function
    at Object.module.exports.server._commit.res.fail (/Users/erundook/Sites/dtest/node_modules/derby/node_modules/racer/lib/txns/txns.Model.js:319:22)
    at module.exports.events.middleware.txn (/Users/erundook/Sites/dtest/node_modules/derby/node_modules/racer/lib/txns/txns.Store.js:109:24)
    at Store._sendToDb.lockingDone (/Users/erundook/Sites/dtest/node_modules/derby/node_modules/racer/lib/Store.js:282:12)
    at findAndModifyCb (/Users/erundook/Sites/dtest/node_modules/racer-db-mongo/lib/index.js:195:23)
    at Collection.findAndModify (/Users/erundook/Sites/dtest/node_modules/racer-db-mongo/node_modules/mongoskin/node_modules/mongodb/lib/mongodb/collection.js:664:30)
    at Db._executeQueryCommand (/Users/erundook/Sites/dtest/node_modules/racer-db-mongo/node_modules/mongoskin/node_modules/mongodb/lib/mongodb/db.js:1759:5)
    at Collection.findAndModify (/Users/erundook/Sites/dtest/node_modules/racer-db-mongo/node_modules/mongoskin/node_modules/mongodb/lib/mongodb/collection.js:663:13)
    at exports.bindSkin.obj.(anonymous function) [as findAndModify] (/Users/erundook/Sites/dtest/node_modules/racer-db-mongo/node_modules/mongoskin/lib/mongoskin/utils.js:61:14)
    at DbMongo.findAndModify (/Users/erundook/Sites/dtest/node_modules/racer-db-mongo/lib/index.js:97:22)
    at setCb (/Users/erundook/Sites/dtest/node_modules/racer-db-mongo/lib/index.js:234:13)
@abrkn
Copy link

abrkn commented Dec 11, 2012

+1

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

2 participants