Sample Header Ad - 728x90

How to increase the maximum number of open files on Fedora?

9 votes
2 answers
13847 views
I want to increase the maximum number of open files in Fedora 27, since the default settings are too low: $ ulimit -Sn 1024 $ ulimit -Hn 4096 First, I ensure that the system-wide setting is high enough, by adding the following line to /etc/sysctl.conf: fs.inotify.max_user_watches=524288 fs.file-max=100000 Then, I set the user-specific settings by adding the following lines to /etc/security/limits.conf (root must be added separately since the Wildcard matches all users _except_ root): * soft nofile 100000 * hard nofile 100000 root soft nofile 100000 root hard nofile 100000 To ensure that the above settings are actually loaded, I have added the following line to /etc/pam.d/login: session required pam_limits.so After rebooting my computer and logging in, I still get the same results for ulimit -Sn and ulimit -Hn. Only the system-wide setting have been set: $ cat /proc/sys/fs/file-max 100000 I'm a bit at a loss as to what to do... Anybody have any ideas how I might diagnose/solve this?
Asked by Wouter Beek (241 rep)
Mar 4, 2018, 05:22 PM
Last activity: Jul 27, 2023, 07:54 PM