It’s different across different platforms, but here’s a thread in this forum that discusses how to do it for RHEL 7: Ulimit on RHEL 7 and BES 9.5 server
In general, there are hard limits and soft limits for all system limits. Soft limits can be changed by each user, and affect their particular shell/processes. Hard limits can only be changed by root and apply to all users of the system, meaning that soft limits cannot violate the hard limits. Unlimited is a value that you can change the hard and soft limits to.
Since our processes run as root, you need to change the soft limit as root, and possibly the hard limit (if it is not already unlimited or 16384+). The limit we care about is the ‘nofiles’ limit which refers to ‘number of files’ or file handles. A typical command to change this is
ulimit -n 16384
ulimit -n unlimited
Depending on the OS, you may need to add this command to a shell setup (or similar) script, or add the equivalent entry into the limits.conf file (e.g.
root soft nofile unlimited).