Unable to increase ulimit on Fedora 32

I’m trying to increase the (soft) ulimit for my user on Fedora 32. I’ve followed the instructions here, but things don’t seem to be working:

❯ ulimit -Sn
1024
❯ ulimit -Hn
524288

I’ve bumped the maximum number of system-wide file descriptors:

❯ cat /proc/sys/fs/file-max
262144

And I’ve increased the max file descriptors for my user in /etc/security/limits.conf:

❯ cat /etc/security/limits.conf
# /etc/security/limits.conf
# <--SNIP-->
tao soft nofile 65536
tao hard nofile 131072

# End of file

Finally, I’ve also added the line session required pam_limits.so to my /etc/pam.d/login:

❯ cat /etc/pam.d/login
#%PAM-1.0
auth       substack     system-auth
auth       include      postlogin
account    required     pam_nologin.so
account    include      system-auth
password   include      system-auth
# pam_selinux.so close should be the first session rule
session    required     pam_selinux.so close
session    required     pam_loginuid.so
session    optional     pam_console.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session    required     pam_selinux.so open
session    required     pam_namespace.so
session    required     pam_limits.so
session    optional     pam_keyinit.so force revoke
session    include      system-auth
session    include      postlogin
-session   optional     pam_ck_connector.so

Does anyone have any idea what could be missing here? Or how I’d go about debugging the issue?

Did you log out and log back in or it is not necessary :thinking:?

I’m not completely sure whether it’s necessary, but for good measure I even rebooted – but to no avail.

Solved the problem. It seems that the GUI does not read from /etc/security/limits.conf, but uses systemd’s own limits configuration. You have to update both /etc/systemd/user.conf and /etc/systemd/system.conf for the soft and hard limits, respectively. Append the following to each (with the correct limit):

DefaultLimitNOFILE=131070

Then reboot.

3 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.