我为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)
有什么想法吗?