ActiveRecord连接池checkout_timeout未使用

时间:2014-02-20 00:00:08

标签: postgresql activerecord connection-pooling

我为ActiveRecord设置了checkout_timeout:

  ActiveRecord::Base.establish_connection(
    adapter: 'postgresql',
    database: 'abe',
    host: 'redacted',
    username: 'redacted',
    password: '',
    checkout_timeout: 15,
  )

#...
ActiveRecord::Base.connection_pool.with_connection do
  #...
end

可是:

connection_pool.rb:190:in `block in wait_poll': could not obtain a database connection within 5.000 seconds (waited 5.001 seconds) (ActiveRecord::ConnectionTimeoutError)

有什么想法吗?

0 个答案:

没有答案
相关问题