Increasing nproc for processes launched by systemd on CentOS 7

Solution 1:

systemd completely ignores /etc/security/limits*. If you are using an RPM that auto-squashes its systemd service file on update, you'll want to file a PR to ask them to mark those files as 'noreplace'

You need to update the .service file /usr/lib/systemd/system/<servicename>.service

Description=Some Daemon



sickill pointed out that you can also override the package-installed values (found in the above file) by adding them to /etc/systemd/system/<servicename>.d/override.conf


This provides the added bonus of system-specific settings that aren't in danger of being overwritten on package update.

Then issue the command: systemctl daemon-reload

Solution 2:

Configuration files in /usr/lib/systemd/system/ should not be edited by hand and it is perfectly normal (if not expected) that an rpm will update files that it manages in this directory on update.

As @sickill and @Cherif KAOUA pointed out in comments [] you should add custom configuration including limits into /etc/systemd/system/<servicename>.service.d/override.conf. eg:


Then reload the systemctl daemon config:

systemctl daemon-reload

RHEL has a great section on systemd in their System Administrator Guide which among other things, lists where systemd unit files should be located and how to override defaults.