【发布时间】:2012-12-03 01:19:51
【问题描述】:
我收到此错误:
'could not obtain a database connection within 5 seconds (waited 5.001017 seconds). The max pool size is currently 16; consider increasing it.'
首先我得到了这个错误,我将计数从 5 增加到 16。但它仍然在发生,我是唯一一个测试数据库的人。当我是唯一的用户时,为什么会发生这种情况?
顺便说一句,我不在轨道上。我正在使用:
ActiveRecord::Base.establish_connection ({
:adapter => 'mysql2',
:database => 'ck',
:host => 'localhost',
:username => 'root',
:password => '',
:pool => 16,
})
并使用 Sinatra。
谢谢
【问题讨论】:
标签: ruby activerecord