By default the ulimit is set to 1024 only, first you need to increase system wise with adding this one in /etc/sysctl.conf

and then…

# sysctl -p

switch to /etc/security/limits.conf and add the following lines:

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.