As your infrastructure grows and you use Puppet Enterprise (PE) to manage more agents, you might need to increase the number of allowed file handles per client.
PE services can require as much as one file handle per connected client. The default ulimit settings for most operating systems can only support up to about 200 clients. To support more clients, you need to increase the number of allowed file handles.
- Configure ulimit using systemd
- Configure ulimit using upstart
- Configure ulimit on other init systems
<PE_SERVICE> with the name of the service you're configuring. For
example, if you're configuring ulimit for the PuppetDB service, replace
Additionally, these instructions use
32678 as a sample ulimit value. Change this
value according to your needs.
Configure ulimit using systemd
With systemd, the allowed number of open file handles is controlled by
LimitNOFILE setting in the
.service file each
Locate the systemd
.servicefile for the PE service you want to configure and copy the file path. The default file path is:
For example, the file path for the PuppetDB service systemd file is:
For a list of service names, refer to Configure ulimit.
Using the file path you determined in the
previous step, run the following commands to
increase the ulimit. Make sure to set the
LimitNOFILEvalue 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
To confirm the change, run:
systemctl show <PE_SERVICE> | grep LimitNOFILE
- Repeat these steps to configure ulimit for other PE services.
Configure ulimit using upstart
For Ubuntu and Red Hat systems, the allowed number of open file handles is specified in system configuration files for each PE service.
Locate the file for the PE service you want to
configure. The location depends on the platform, and the file name matches the PE service name (as listed in Configure ulimit).
ulimitsetting on the last line of the file as follows:
For example, this configuration set the allowed number of open files to 32,678:
ulimit -n <ULIMIT_VALUE>
ulimit -n 32678
Configure ulimit on other init systems
The ulimit controls the number of processes and file handles that a PE service user can open and process.
To increase the ulimit for a PE service user:
limits.conffile located at:
Add these lines to the file, specifying the specific service user's name and the
desired ulimit value:
For example, this configuration sets the ulimit value to 32,678 for the
<PE_SERVICE_USER> soft nofile <VALUE> <PE_SERVICE_USER> hard nofile <VALUE>
pe-puppet soft nofile 32678 pe-puppet hard nofile 32678