我得到的错误是:
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)
2条答案
按热度按时间mrfwxfqh1#
可以指定静态连接数,但是...
。。但是,如果所需的连接数与线程数成比例,则可能需要动态指定它。在本例中,每个线程有两个连接。
mzaanser2#
阅读more