-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
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
Increase request timeout #137
Labels
Expeditor: Skip Version Bump
Used to skip built_in:bump_version
Comments
👍 we are hitting this issue as well. |
ghempton
pushed a commit
to getoutreach/chef-zero
that referenced
this issue
Aug 18, 2015
We perform the monkey patching in our client.rb: require_relative 'monkey_patch_request_timeout' The monkey patch file, monkey_patch_request_timeout.rb, looks like this: # Monkey patch /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/local_mode.rb
# Default timeout is 30.
class Chef
module LocalMode
def self.with_server_connectivity
setup_server_connectivity
@chef_zero_server.server.config[:RequestTimeout] = 300
begin
yield
ensure
destroy_server_connectivity
end
end
end
end I hope this helps. |
thommay
added a commit
that referenced
this issue
Jul 19, 2016
Increase WEBrick request timeout to 300 seconds. Fixes #137
thommay
added
Expeditor: Skip Version Bump
Used to skip built_in:bump_version
and removed
Meta: Exclude From Changelog
labels
Sep 22, 2017
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Chef Zero is using WEBrick which by default has a request timeout limit of 30 seconds. I would like to propose that Chef Zero changes this limit to 300 seconds in order to match the default
rest_timeout
setting of chef-client and so that I can avoid having failed tests in my CI environment due to this timeout.Why? Because I've encountered this timeout limit on a fairly regular basis when using
chef-client -z
on a Chef Provisioning recipe that creates 10 nodes and then initiates a converge on each of them. The timeout happens during cookbook synchronization before any recipe is actually executed. Each node fetches 18 recipes - a total of 4 Mb per node - which is not really a lot but for some reason that takes around 5 minutes and sometimes gives the following error:When increasing the timeout limit (by temporarily monkey patching chef-client) the issue disappears.
Setting the request timeout can be done like this:
It still takes around 5 minutes for cookbook synchronization to complete which is strangely slow but at least it completes without timeout errors.
The text was updated successfully, but these errors were encountered: