We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
The text was updated successfully, but these errors were encountered:
@asper-ru shell_out exposes a timeout parameter which will override the constant if set. Ideally we'd add some logic here:
shell_out
timeout
mariadb/libraries/helpers.rb
Lines 52 to 67 in 1fcd4c1
To set the timeout and then add new a new timeout property to resources which use this method.
Sorry, something went wrong.
Well, using resource 'execute' with 'timeout' property is an option
No branches or pull requests
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:
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
The text was updated successfully, but these errors were encountered: