22.2. Linux User Limits

SavaPage server may run out of file descriptors as the system defaults are normally very low. A file descriptor (FD) is a handle created by a process when a file is opened. Each process can use a limited number of FDs as specified per user in an OS level user limit.

Beware that apart from regular files that are accessed by SavaPage from disk, each incoming request that uses a TCP socket also consumes one file descriptor from the total available for the process.

22.2.1. SysVinit User Limits

On Debian based systems the number of process FDs for the savapage user can be increased as follows.

Edit the file Edit /etc/security/limits.conf like this:

sudo vi /etc/security/limits.conf

and add the following lines at the end of the file:

savapage    hard    nofile    65536
savapage    soft    nofile    65536

Next, open /etc/pam.d/su like this:

sudo vi /etc/pam.d/su

and uncomment the following line:

session    required   pam_limits.so

You also need to edit the /etc/pam.d/common-session and /etc/pam.d/common-session-noninteractive files. Open the files like this:

sudo vi /etc/pam.d/common-session
sudo vi /etc/pam.d/common-session-noninteractive

and for each file add the following line to the end:

session required pam_limits.so

Finally, check whether the settings are applied with this command:

sudo su - savapage -c "ulimit -n"

This should output the value 65536.

22.2.2. Systemd User Limits

Systemd ignores ulimit values as described in the previous section, and has its own equivalent that can be used per service. The best way to set user limits for the savapage.service is by an override, that will have the last say over any SavaPage default.

Check the /lib/systemd/system/savapage.service unit to see if the value of the LimitNOFILE directive is to your liking. This directive corresponds to ulimit -n (open files) and defaults to 65536.

cat /lib/systemd/system/savapage.service | grep LimitNOFILE

If this directive is absent, or if you want to override the value, edit the service unit with this command:

sudo systemctl edit savapage

This launches a text editor for creating the file:


Add the following lines, using your own choice (e.g. 98304):


Save the file and close the editor. Usually, after you edited a systemd unit file, for it to take effect, you need to run:

sudo systemctl daemon-reload

However, the systemctl edit command automatically did this for you. You can check the effect of the override with this command:

systemctl cat savapage.service | grep LimitNOFILE

... the last line should show:


Restart SavaPage for the changes to take effect, and check if the override has effect with this command:

systemctl status savapage.service

Notice the Drop-In override.conf as shown below:

savapage.service - SavaPage Open Print Portal
   Loaded: loaded (/lib/systemd/system/savapage.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/savapage.service.d
           |- override.conf
   Active: active (running) since ...


Check if the open files override value is shown correctly in the Host System section of the Admin Web App, since this is the actual value that the SavaPage server process uses.