我只是用Kadira来分析我的Meteor应用程序的性能。
在我的登录方法的跟踪资源管理器中,它报告说:“您没有为您的Meteor应用程序添加oplog支持。”
并提供以下链接:http://goo.gl/Co1jJc
我遵循链接,根据我所读到的,如果您运行的版本高于0.7,Meteor默认应该打开oplog支持。我运行的版本为0.8.2,Kadira说我还没有为我的Meteor应用程序添加oplog支持。
为什么以及如何增加oplog支持?
下面是报告不使用oplog支持的方法的一些细节(来自Kadira)
collection : users
selector: {"_id":"h5aq5trwZgkDJSKpX"}
function : observeChanges
isCursorMethod: true
fields: {"profile":1,"username":1,"emails":1}
oplog: false
noOfHandles: 1
noOfCachedDocs: 1发布于 2014-08-21 03:26:32
来自流星维基
您将需要自己的mongoDB服务器(例如,不是托管在meteor.com上,也不是在共享的mongoDB主机上)。
然后,仅在mongo2.4上添加一个可以访问oplog连接的新用户:
$ mongo -u YourExistingAdminUserName -p YourExistingAdminPassword mongo-server-1.example.com/admin
cluster:PRIMARY> db.addUser({user: "oplogger", pwd: "PasswordForOplogger", roles: [], otherDBRoles: {local: ["read"]}})然后,在运行捆绑Meteor应用程序时,设置MONGO_OPLOG_URL环境变量:
MONGO_OPLOG_URL=mongodb://oplogger:PasswordForOplogger@mongo-server-1.example.com,mongo-server-2.example.com,mongo-server-3.example.com/local?authSource=adminhttps://stackoverflow.com/questions/25416652
复制相似问题