Description
I tried to make long SQL query (loading database), but it terminated after 10 minutes due to Mixlib::ShellOut timeout settings.
Cookbook version 4.1.0
Version of chef-client in your environment: 16.1.16
Operating system distribution and release version: Ubuntu 20.04
Steps to reproduce the behavior:
To run a long SQL command, to load database from the file, for example. In my case it was:
mariadb_database 'load database' do
sql 'use db_staging; source /var/lib/db_production.sql;'
action :query
end
It starting to load the database, but after ten minutes fails with an error:
Caused by Mixlib::ShellOut::CommandTimeout: Command timed out after 600s:
Command exceeded allowed execution time, process terminated
I guess it can be related with mixlib-shellout gem settings, where I can find the line:
DEFAULT_READ_TIMEOUT = 600
(the file in my system is: /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/mixlib-shellout-3.0.9/lib/mixlib/shellout.rb)
But I have no idea how to redefine this constant from my recipe to let chef-client work longer