采用 rails 默认的数据库配置配置
production:
adapter: mysql2
encoding: utf8
database: TaskSystem_development
pool: 8
username: root
password: XXX
host: localhost
运行一段时间后就出现
ctiveRecord::ConnectionTimeoutError (could not obtain a database connection within 5.000 seconds (waited 5.000 seconds)):
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in `block in wait_poll'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:181:in `loop'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:181:in `wait_poll'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:136:in `block in poll'
e:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
上网搜索有的说是 pool 加大,但是加大后还是会出现这个情况,有没有人遇到过这个情况,求助!