By default the ulimit is set to 1024 only, first you need to increase system wise with adding this one in /etc/sysctl.conf
“fs.file-max = 65536″
and then…
# sysctl -p
switch to /etc/security/limits.conf and add the following lines:
* hard nofile 65536 * soft nofile 16384
switch to user for which you need to increase the file-max for, with this the default for all users will be 16384, you can increase with ulimit -n XXXX now.