Recently we added timeouts for our database with configuration like
Configuration from database.yml
connect_timeout: 5
read_timeout: 5
write_timeout: 5
checkout_timeout: 5
All values are in seconds
Steps to reproduce
When i run cap production deploy the deployment fails on migration step and gives error
Mysql2::Error::TimeoutError: Timeout waiting for a response from the last query.
Expected behavior
We want use MAX_EXECUTION_TIME=90000 rake db:migrate during our cap deploy and we will add a variable max_execution_time in our database.yml which will default to 5 seconds.
Additionally we could inject read_timeout also along with it if the max execution time doesn't work alone.
Actual behavior
We cannot control the injection of this variable because our Capfile uses capistrano/rails which will run rake db:migrate without maximum execution time and our migration could take much more time than our DB timeouts.
Recently we added timeouts for our database with configuration like
Configuration from
database.ymlconnect_timeout: 5
read_timeout: 5
write_timeout: 5
checkout_timeout: 5
All values are in seconds
Steps to reproduce
When i run
cap production deploythe deployment fails on migration step and gives errorMysql2::Error::TimeoutError: Timeout waiting for a response from the last query.
Expected behavior
We want use
MAX_EXECUTION_TIME=90000 rake db:migrateduring our cap deploy and we will add a variablemax_execution_timein ourdatabase.ymlwhich will default to 5 seconds.Additionally we could inject
read_timeoutalso along with it if the max execution time doesn't work alone.Actual behavior
We cannot control the injection of this variable because our Capfile uses
capistrano/railswhich will runrake db:migratewithout maximum execution time and our migration could take much more time than our DB timeouts.