体验Mongo::OperationTimeout每20分钟-2小时一次
我似乎每 20 分钟 - 1 小时就会经历一次 Mongo::OperationTimeout 我的堆栈:
- Rails 3.1.3
- Mongoid 3 (git edge)
- Unicorn 4.1.1
- 2 X MongoDB 2.0.2(应该正确设置 KeepAlive 默认值)配置为 ReplicaSet
- Ubuntu m1.large EC2
我尝试将 EC2 上的 KeepAlive 设置为 300就像http://www.mongodb.org/display/DOCS/Amazon+EC2 但仍然没有帮助
我尝试仅使用一个主要配置而不是 ReplicaSet,但这并没有帮助也有帮助。
下面是 mongoid.conf:
production: database: my-app-name op_timeout: 10 read_secondary: true max_retries_on_connection_failure: 3 identity_map_enabled: true allow_dynamic_fields: false hosts: - - ip-XXX.ec2.internal - 27017 - - ip-XXX.ec2.internal - 27017
I seem to be experiencing a Mongo::OperationTimeout every ~20 mins - 1 Hour
My stack:
- Rails 3.1.3
- Mongoid 3 (git edge)
- Unicorn 4.1.1
- 2 X MongoDB 2.0.2 (which should have the KeepAlive default set right) configured as ReplicaSet
- Ubuntu m1.large EC2
I have tried setting KeepAlive on EC2 to 300 like said in http://www.mongodb.org/display/DOCS/Amazon+EC2 but still did not help
I have tried working with just one primary configuration instead of the ReplicaSet, but this did not help either.
Below is mongoid.conf:
production: database: my-app-name op_timeout: 10 read_secondary: true max_retries_on_connection_failure: 3 identity_map_enabled: true allow_dynamic_fields: false hosts: - - ip-XXX.ec2.internal - 27017 - - ip-XXX.ec2.internal - 27017
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过一番集体思考后,我们针对我们的情况提出了一些观点:
After some group thinking, here are some points we came up with regarding our situation: