diff --git a/recipes/default.rb b/recipes/default.rb index 61f46a7..2c36215 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -75,6 +75,7 @@ template "/etc/strfry.conf" do bind: node["strfry"]["bind_ip"], real_ip_header: node["strfry"]["real_ip_header"], port: node["strfry"]["port"], + nofiles: node["strfry"]["nofiles"], info: node["strfry"]["info"] } notifies :restart, "service[strfry]", :delayed diff --git a/templates/default/strfry.conf.erb b/templates/default/strfry.conf.erb index 00fe559..146caa8 100644 --- a/templates/default/strfry.conf.erb +++ b/templates/default/strfry.conf.erb @@ -43,7 +43,7 @@ relay { port = <%= @config[:port] || "7777" %> # Set OS-limit on maximum number of open files/sockets (if 0, don't attempt to set) (restart required) - nofiles = 1000000 + nofiles = <%= @config[:nofiles] || "524288" %> # HTTP header that contains the client's real IP, before reverse proxying (ie x-real-ip) (MUST be all lower-case) realIpHeader = "<%= @config[:real_ip_header] %>"