0

我在带有 ubuntu 12.04 64 位和 1.7 GB RAM 的 Amazon EC2 上使用 Rails 3、Ruby 1.9.3、MongoId 驱动程序。

在每个请求中,我看到连接数增加。见下文 db.status()

connections:
{
   "current": NumberInt(17),
   "available": NumberInt(15983),
   "totalCreated": NumberLong(51) 
}

目前,我没有在 mongoid.yml 中指定与池大小相关的任何内容

我如何在 Rails 3 中使用带有 mongoid 的连接池?

4

1 回答 1

2

您可以指定池大小来为您的环境启用连接池。

production:
    pool_size: 5
于 2013-08-03T14:20:47.760 回答