如何在ActiveRecord中增加最大池大小?

时间:2010-10-19 07:45:36

标签: ruby activerecord sqlite

我收到错误:

Error "ActiveRecord::ConnectionTimeoutError - could not obtain a database connection within 5 seconds.  The max pool size is currently 5; consider increasing it."

如何增加最大池大小?

# DB CONNECTION
DB_CONN = ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :dbfile => DB_FILE)

1 个答案:

答案 0 :(得分:45)

config/database.yml
pool: 8 (default is 5)

阅读more