]> git.openstreetmap.org Git - chef.git/commitdiff
Set memory limits for user slices on the dev server
authorTom Hughes <tom@compton.nu>
Wed, 8 Nov 2023 18:48:23 +0000 (18:48 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 8 Nov 2023 18:48:23 +0000 (18:48 +0000)
cookbooks/dev/recipes/default.rb
cookbooks/dev/templates/default/user-slice.conf.erb [new file with mode: 0644]

index 7eed5a159c4e9d4878acc7a5634c855f91a013fa..4723770439f84aac11073de3e93a0358c71e1bd1 100644 (file)
@@ -596,3 +596,16 @@ end
 apache_site "ooc.openstreetmap.org" do
   template "apache.ooc.erb"
 end
+
+directory "/etc/systemd/system/user-.slice.d" do
+  owner "root"
+  group "root"
+  mode "0755"
+end
+
+template "/etc/systemd/system/user-.slice.d/99-chef.conf" do
+  source "user-slice.conf.erb"
+  owner "root"
+  group "root"
+  mode "0644"
+end
diff --git a/cookbooks/dev/templates/default/user-slice.conf.erb b/cookbooks/dev/templates/default/user-slice.conf.erb
new file mode 100644 (file)
index 0000000..47d8a06
--- /dev/null
@@ -0,0 +1,3 @@
+[Slice]
+MemoryHigh=80%
+MemoryMax=90%