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

Pra*_*man 32 ruby sqlite activerecord

我收到错误:

Error "ActiveRecord::ConnectionTimeoutError - could not obtain a database connection within 5 seconds.  The max pool size is currently 5; consider increasing it."
Run Code Online (Sandbox Code Playgroud)

如何增加最大池大小?

# DB CONNECTION
DB_CONN = ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :dbfile => DB_FILE)
Run Code Online (Sandbox Code Playgroud)

zen*_*ngr 45

config/database.yml
pool: 8 (default is 5)
Run Code Online (Sandbox Code Playgroud)

阅读更多