]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/apache/recipes/default.rb
Apply memory limits to apache servers to avoid memory exhaustion
[chef.git] / cookbooks / apache / recipes / default.rb
index b1e80892908bbed6ab8a9222bc0784afd55c1f67..8f217d36478d55a0a06e72fca1948c6d9f305872 100644 (file)
@@ -54,6 +54,13 @@ template "/etc/apache2/ports.conf" do
   mode "644"
 end
 
+systemd_service "apache2" do
+  dropin "chef"
+  memory_high "50%"
+  memory_max "75%"
+  notifies :restart, "service[apache2]"
+end
+
 service "apache2" do
   action [:enable, :start]
   retries 2