我的堆栈:RoR4.2.6,Mongoid 5.0.1
我正在使用apache基准测试对我的网站进行基准测试,并继续遇到如下错误:
2016-03-24 22:15:36 +0000 pid=23187, severity=FATAL,
ActionView::Template::Error (Timed out attempting to dequeue connection after 1 sec.):
22: =link_to '/albums/' + mention.object.slug do
23: .small-12.medium-6.large-4.columns.left
24: .mention-box
25: %img.mention-thumb{src: mention.object.thumb_url}
26: %h5.mention-name
27: = mention.object.name
28: %br
app/models/mention.rb:13:in `object'
app/views/posts/_full_mention.html.haml:25:in `block in _app_views_posts__full_mention_html_haml___1744802549767261808_47000690052420'
Run Code Online (Sandbox Code Playgroud)
并且仅供参考,这是在提及.rb中调用的行,只是一个简单的查找查询:
def object
Object.const_get(type).find(mention_id)
end
Run Code Online (Sandbox Code Playgroud)
我的假设是,这意味着我要求mongoDB请求太多而且无法跟上,但不能完全确定如何解决这个问题.我应该为mongoid设置更高的队列超时吗?感谢任何建议!
从我收集到的,我的问题有很多解决方案,但我很欣赏一些从哪里开始的建议.这是我们目前在heroku上运行的堆栈:
使用Elastic Beanstalk vs OpsWorks vs CloudFormation的决定与仅我自己手动设置所有内容相关?另外,出于经济原因,如果可能的话,我不想使用像Docker这样的第三方服务.过多的选择让我对于从何处开始或如何选择感到困惑.背景:现在我真的很喜欢Heroku b/ci不必过多考虑系统管理员(在我的团队中我是唯一的开发人员),但我们最近获得了很多年度AWS学分,所以它似乎可以赚钱让我们转向AWS的意义.
非常感谢有关如何使用以下堆栈正确部署Elastic Beanstalk的资源建议:
我是否需要在ebextension文件中设置所有这些内容?或者是在AWS中手动设置,然后在某处正确地将它们路由到一起?
deployment mongodb amazon-web-services elasticsearch amazon-elastic-beanstalk