Increase task limit for apache on nominatim servers
authorTom Hughes <tom@compton.nu>
Wed, 6 Nov 2019 12:08:02 +0000 (12:08 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 6 Nov 2019 12:08:02 +0000 (12:08 +0000)
cookbooks/nominatim/recipes/default.rb
cookbooks/systemd/resources/service.rb
cookbooks/systemd/templates/default/service.erb

index 63fe2ca0662c8ecd9a15fcdbf66650bbfa988337..b1c75a47bd489f50c44e51b1062718056b2737b1 100644 (file)
@@ -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",
index 3132c63cdcba5829061cb3aef35c10fd986797e1..282b36178890afc90949c0b34a1452ed792038f6 100644 (file)
@@ -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
 
index ed117c24e51932c849cce0ed0c0ea42792c4798c..46b8aa575f66b7646cbde14d9da156c600c51ab0 100644 (file)
@@ -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 -%>