为什么我的 MongoDB 日志充满“getmore local.oplog.rs”?
这在我的 MongoDB 日志中一遍又一遍地重复。一些注意事项:
- Ubuntu 11.04 上的 MongoDB 1.8.1
- 主副本集
- 64gb 磁盘
- 5gb RAM
new Date(5610408224193773570)
始终相同verbose = true
在config 文件
难道是我的oplog太大了,所以每次二级查询都需要4秒?
Wed May 25 00:35:58 [dur] lsn set 1552362
Wed May 25 00:36:02 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:06 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:11 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3884ms
Wed May 25 00:36:15 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:19 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:23 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:27 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:31 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:35 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:39 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:43 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:47 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:51 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:55 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:58 [dur] lsn set 1582372
Wed May 25 00:36:59 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:02 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:817 nreturned:1 3229ms
Wed May 25 00:37:06 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3685ms
Wed May 25 00:37:10 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:14 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:18 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:22 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:26 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:30 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:34 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:38 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:42 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:46 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:50 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:54 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:58 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:58 [dur] lsn set 1612372
This is repeated over and over again in my MongoDB logs. Some notes:
- MongoDB 1.8.1 on Ubuntu 11.04
- Primary in a replica set
- 64gb disk
- 5gb RAM
new Date(5610408224193773570)
is always the sameverbose = true
is commented out in the config file
Could it be that my oplog is too large, so every time a secondary queries it it takes 4 seconds?
Wed May 25 00:35:58 [dur] lsn set 1552362
Wed May 25 00:36:02 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:06 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:11 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3884ms
Wed May 25 00:36:15 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:19 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:23 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:27 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:31 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:35 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:39 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:43 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:47 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:51 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:55 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:36:58 [dur] lsn set 1582372
Wed May 25 00:36:59 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:02 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:817 nreturned:1 3229ms
Wed May 25 00:37:06 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3685ms
Wed May 25 00:37:10 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:14 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:18 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:22 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:26 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:30 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:34 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:38 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:42 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:46 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:50 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:54 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:58 [conn14] getmore local.oplog.rs cid:265112601668423723 getMore: { ts: { $gte: new Date(5610408224193773570) } } bytes:20 nreturned:0 3979ms
Wed May 25 00:37:58 [dur] lsn set 1612372
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
鉴于日期相同,看起来辅助节点正在查询新的 oplog 条目,但根本没有得到任何信息。您是否正在向主数据库写入任何数据?
这种行为看起来有点不寻常。然而,我只是通过启动一个副本集而不是写入它来得到同样的结果。您所看到的行为是预期的。
Given that the date is the same, it looks like a secondary is querying for new oplog entries and simply not getting anything. Are you writing any data to the primary?
The behavior looks a little unusual. However, I'm getting the same thing simply by starting a replica set and not writing to it. The behavior you're seeing is expected.