Edit open file limit for SysV service in CentOS 7

LordBean asked:

I want to change open file limit for a Riak service in CentOS 7. The problem is that Riak still uses SysV init script.

According to docs i have to create /etc/systemd/system/riak.d/NAME.conf and set the parameter there. Then reload systemd and the service.

 # In /etc/systemd/system/riak.d/limits.conf
 [Service]
 LimitNOFILE=65536

But this has no effect:

$ systemctl show riak -p LimitNOFILE 
LimitNOFILE=4096

What did I do wrong? Does this work for SysV init scripts?

My answer:


I think you need riak.service.d, not riak.d.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.