Skip to content

Commit

Permalink
Set memory limits for user slices on the dev server
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Nov 8, 2023
1 parent f4706c8 commit ed43477
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions cookbooks/dev/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -596,3 +596,16 @@
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
3 changes: 3 additions & 0 deletions cookbooks/dev/templates/default/user-slice.conf.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[Slice]
MemoryHigh=80%
MemoryMax=90%

0 comments on commit ed43477

Please sign in to comment.