Skip to content

Commit

Permalink
Add MemoryLimit to limits template
Browse files Browse the repository at this point in the history
MemoryLimit is required to restrict memory on a
systemd service effectvely. Its a more powerful
and working replacement to LimitRSS= which is
not implemented in linux. See man page[1] for
more details.

[1] http://www.dsm.fordham.edu/cgi-bin/man-cgi.pl?topic=systemd.exec&ampsect=5
  • Loading branch information
pkilambi committed Mar 22, 2017
1 parent a032136 commit c4d1afa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion templates/limits.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
'LimitMSGQUEUE',
'LimitNICE',
'LimitRTPRIO',
'LimitRTTIME'
'LimitRTTIME',
'MemoryLimit',
].each do |d|
if @limits[d] -%>
<%= d %>=<%= @limits[d] %>
Expand Down

0 comments on commit c4d1afa

Please sign in to comment.