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

DB calls not being Fiberized #212

Closed
rharrell-southern opened this issue Jul 5, 2012 · 1 comment
Closed

DB calls not being Fiberized #212

rharrell-southern opened this issue Jul 5, 2012 · 1 comment

Comments

@rharrell-southern
Copy link

When i'm runing MongoDB interactions on the server side JavaScript, I am periodically getting an error from Meteor.

app/packages/mongo-livedata/collection.js:227
        throw e;
              ^
Error: Meteor code must always run within a Fiber
    at [object Object].get (app/packages/meteor/dynamics_nodejs.js:14:15)
    at [object Object]._maybeBeginWrite (app/packages/mongo-livedata/mongo_driver.js:70:41)
    at [object Object].update (app/packages/mongo-livedata/mongo_driver.js:193:20)
    at [object Object].update (app/packages/mongo-livedata/collection.js:221:32)
    at Array.0 (app/server/publish.js:4:15)
    at [object Object]._teardown (app/packages/livedata/livedata_server.js:584:31)
    at [object Object].stop (app/packages/livedata/livedata_server.js:464:10)
    at app/packages/livedata/livedata_server.js:365:11
    at Function.<anonymous> (app/packages/underscore/underscore.js:84:24)
    at [object Object]._stopAllSubscriptions (app/packages/livedata/livedata_server.js:364:7)
Exited with code: 1

It looks like server side DB calls are not always getting correctly Fiberized for nodejs to process. It doesn't happen all the time and appears random. Often if we leave meteor running overnight it will have error-ed out when we come back in the morning. Sometimes meteor can recover, sometimes it needs to be reset.

@rharrell-southern
Copy link
Author

I have fixed this error on our end by wrapping all our database calls in a Fiber(function(){ ... }).run(); but this is a hack around for the problem, it should be addressed in Meteor, IMO.

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