【问题标题】:How to increase max pool size in ActiveRecord?如何增加 ActiveRecord 中的最大池大小?
【发布时间】:2011-04-27 08:15:04
【问题描述】:

我得到错误:

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)

【问题讨论】:

    标签: ruby activerecord sqlite


    【解决方案1】:
    config/database.yml
    pool: 8 (default is 5)
    

    阅读more

    【讨论】:

    • @PrakashRaman 我不明白你的 cmets。您必须在哪里使用:pool => [int]?似乎 Ruby 代码不是 YAML。
    猜你喜欢
    • 2021-09-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-30
    • 2019-03-10
    • 2013-03-29
    • 2016-03-14
    • 2014-02-02
    相关资源
    最近更新 更多