Well, it looks like in these lines 29 and 30 in mysql_adapter.rb,
@connection.options(Mysql::OPT_READ_TIMEOUT, @config[:read_timeout]) if @config[:read_timeout] @connection.options(Mysql::OPT_WRITE_TIMEOUT, @config[:write_timeout]) if @config[:write_timeout]
You just need to add the read_timeout and write_timeout values ββto the .yaml database configuration file.
In this way,
development: adapter: mysql encoding: utf8 database: app_development pool: 5 username: root password: write_timeout: 1 read_timeout: 1
Use the trick to set read and write timeouts for 1 second. Unfortunately, this does not allow you to set intermediate timeouts.
source share