我在Amazon EC2上使用Rails 3,Ruby 1.9.3,MongoId驱动程序,使用ubuntu 12.04 64位和1.7 GB RAM。
在每个请求上,我看到连接数增加。见下文 db.status()
connections:
{
"current": NumberInt(17),
"available": NumberInt(15983),
"totalCreated": NumberLong(51)
}
目前,我没有在mongoid.yml
中指定任何与池大小相关的内容如何在Rails 3中使用mongoid连接池?
答案 0 :(得分:2)
您可以指定池大小以为您的环境启用连接池。
production:
pool_size: 5