On a fresh-installed Centos 8.1(kernel 4.18.0-147.8.1.el8_1) machine, the max number of opened file descriptors is set to H: 2048, S: 1024.
/etc/security/limits.conf the limits can be upped. But this only takes effect in non-gnome-terminals, such as ssh sessions.
The gnome terminals do not see
/etc/security/limits.conf during login as they are started under systemd(I hate it).
According to this,
/etc/systemd/user.conf sets the soft limit and
/etc/systemd/system.conf sets the hard limit for the user under systemd. The variable for file descriptors is
If you are using Node.js, one more step is required:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p according to this issue.