Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 1
    Have you considered using ulimit older simpler, and should work in this case. Commented Jun 11, 2018 at 23:18
  • Unfortunately, I don't have a choice in this matter. systemd is the only option. Based on the man page the MemoryMax should work for a service. It just doesn't for some reason. Commented Jun 11, 2018 at 23:25
  • you do have an option to consider it. It looks like you did. Commented Jun 12, 2018 at 11:05
  • 6
    @ctrl-alt-delor ulimit doesn't work for memory restrictions. The last kernel to support it (RLIMIT_RSS) was 2.4.30, which is 12 years old. See unix.stackexchange.com/a/32375/4358 Commented Jun 12, 2018 at 12:25
  • I also had the error: Unknown lvalue 'MemoryMax' in section 'Service' I have an older version of systemd and so I had to use MemoryLimit instead of MemoryMax. Commented Nov 18, 2019 at 14:24