diff --git a/chef/cookbooks/haproxy/attributes/default.rb b/chef/cookbooks/haproxy/attributes/default.rb index 766946d..1ee4b59 100644 --- a/chef/cookbooks/haproxy/attributes/default.rb +++ b/chef/cookbooks/haproxy/attributes/default.rb @@ -66,7 +66,7 @@ default['haproxy']['cookie'] = nil default['haproxy']['user'] = "haproxy" default['haproxy']['group'] = "haproxy" -default['haproxy']['global_max_connections'] = 4096 +default['haproxy']['global_max_connections'] = 8192 default['haproxy']['member_max_connections'] = 100 default['haproxy']['frontend_max_connections'] = 2000 default['haproxy']['frontend_ssl_max_connections'] = 2000 diff --git a/chef/cookbooks/haproxy/recipes/tcp_lb.rb b/chef/cookbooks/haproxy/recipes/tcp_lb.rb index db7de8c..9a0929b 100644 --- a/chef/cookbooks/haproxy/recipes/tcp_lb.rb +++ b/chef/cookbooks/haproxy/recipes/tcp_lb.rb @@ -33,9 +33,9 @@ end mydata = data_bag_item(defaultbag, myitem) if mydata['ha']['status'].eql?('enable') + node.set['haproxy']['enabled_services'] = nil node.set['haproxy']['incoming_address'] = mydata['ha']['haproxy']['vip'] - #services = node['haproxy']['enabled_services'].clone mydata['ha']['haproxy']['roles'].each do |role, services| services.each do |service| node.set['haproxy']['services'][service]['role'] = role diff --git a/chef/cookbooks/haproxy/templates/default/haproxy.cfg.erb b/chef/cookbooks/haproxy/templates/default/haproxy.cfg.erb index d4de2e5..c248335 100644 --- a/chef/cookbooks/haproxy/templates/default/haproxy.cfg.erb +++ b/chef/cookbooks/haproxy/templates/default/haproxy.cfg.erb @@ -2,6 +2,7 @@ global log 127.0.0.1 local0 log 127.0.0.1 local1 notice #log loghost local0 info + daemon maxconn <%= node['haproxy']['global_max_connections'] %> #debug #quiet