- Different technique needed for GUI and non-GUI login:
https://superuser.com/questions/1200539/cannot-increase-open-file-limit-past-4096-ubuntu
- Contents of
/etc/security/limits.conf
. For non-GUI login:
# FIXME: is * and root required?
@plus soft nofile 131072
@plus hard nofile 131072
- Contents of
/etc/systemd/system.conf
. Uncomment following line. Other limits can also be set here. For GUI login.
DefaultLimitNOFILE=131072
- Help to debug "too many open files". From, https://www.thegeekdiary.com/lsof-most-commonly-used-examples/:
# creates a report
lsof | perl -lane '$x{"$F[0]:$F[1]"}++;END { print "$x{$_}\t$_" for sort {$x{$a}<=>$x{$b}} keys %x}'
# open files by command name, can have multiple comments
lsof -c ssh -c init
# by user
lsof -u edc
# by process
lsof -p 27012