Too many open files

problem
cat /proc/sys/fs/file-nr
6304 0 97745

solution:
sysctl -w fs.file-max=1024000