Configure ulimit using systemd

With systemd, the allowed number of open file handles is controlled by the LimitNOFILE setting in the .service file each PE service.

  1. Locate the systemd .service file for the PE service you want to configure and copy the file path. The default file path is:
    /usr/lib/systemd/system/<PE_SERVICE>.service

    For example, the file path for the PuppetDB service systemd file is:

    /usr/lib/systemd/system/pe-puppetdb.service

    For a list of service names, refer to Configure ulimit.

  2. Using the file path you determined in the previous step, run the following commands to increase the ulimit. Make sure to set the LimitNOFILE value to the desired file handles limit.
    mkdir /etc/systemd/system/<PE_SERVICE>.service.d
    echo "[Service]LimitNOFILE=32678" > /etc/systemd/system/<PE_SERVICE>.service.d/limits.conf
    systemctl daemon-reload
  3. To confirm the change, run:
    systemctl show <PE_SERVICE> | grep LimitNOFILE
  4. Repeat these steps to configure ulimit for other PE services.