From: Tom Hughes Date: Wed, 6 Nov 2019 12:08:02 +0000 (+0000) Subject: Increase task limit for apache on nominatim servers X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/14b636b3de647a5742e88cb718a3f9d566437b6a Increase task limit for apache on nominatim servers --- diff --git a/cookbooks/nominatim/recipes/default.rb b/cookbooks/nominatim/recipes/default.rb index 63fe2ca06..b1c75a47b 100644 --- a/cookbooks/nominatim/recipes/default.rb +++ b/cookbooks/nominatim/recipes/default.rb @@ -340,6 +340,13 @@ node[:nominatim][:fpm_pools].each do |name, data| end end +systemd_service "apache-nominatim" do + service "apache2" + dropin "nominatim" + tasks_max 12000 + notifies :restart, "service[apache2]" +end + ssl_certificate "nominatim.openstreetmap.org" do domains ["nominatim.openstreetmap.org", "nominatim.osm.org", diff --git a/cookbooks/systemd/resources/service.rb b/cookbooks/systemd/resources/service.rb index 3132c63cd..282b36178 100644 --- a/cookbooks/systemd/resources/service.rb +++ b/cookbooks/systemd/resources/service.rb @@ -59,6 +59,7 @@ property :protect_system, [TrueClass, FalseClass, String] property :protect_home, [TrueClass, FalseClass, String] property :restrict_address_families, [String, Array] property :no_new_privileges, [TrueClass, FalseClass] +property :tasks_max, Integer property :timeout_sec, Integer property :pid_file, String diff --git a/cookbooks/systemd/templates/default/service.erb b/cookbooks/systemd/templates/default/service.erb index ed117c24e..46b8aa575 100644 --- a/cookbooks/systemd/templates/default/service.erb +++ b/cookbooks/systemd/templates/default/service.erb @@ -99,6 +99,9 @@ RestrictAddressFamilies=<%= Array(@restrict_address_families).join(" ") %> <% if @no_new_privileges -%> NoNewPrivileges=<%= @no_new_privileges %> <% end -%> +<% if @tasks_max -%> +TasksMax=<%= @tasks_max %> +<% end -%> <% if @success_exit_status -%> SuccessExitStatus=<%= Array(@success_exit_status).join(" ") %> <% end -%>